Python Challenge – Exercises
These are the basic challenges for Python Level 3 – Console.
Exercise Set 1 – 4 XP
For each of the following, determine the IPO, create a flowchart algorithm and create and test the Python code. Save each.
- Write a program that takes input in Celsius and converts it to Fahrenheit. Ensure the input is read as a float, and the result is displayed with two decimal places.
- Ask the user for their age and score in the theory test. If the user is 16 years or older and scored a minimum of 24 out of 30 in their theory test, output “Able to obtain a learner’s permit”, otherwise output “You do not qualify for a learner’s permit at this time”.
- A program is required to input a range of scores until 999 entered – determine the total, max, min of those entered.
- Create a game code snippet to add experience points and deduct health points from a battle while the character survives. Add to re-spawn the player or quit when then the character “dies”.
Exercise Set 2 – 4 XP
- Implement the Quiz Game Program code at: https://youtu.be/zehwgTB0vV8?si=vjTGu5YFOGTj3xpr.
- Implement the Concession Stand Program code at: https://youtu.be/PbkIzW_70EI?si=jj9jZY2pXe-8GF0Y
Exercise Set 3 – 4 XP
- Create an app with a function InchesToMillimeters, which will convert inches to millimeters.
Note: Conversion: 1 inch = 25.4 millimeters - Number Guessing Game with Functions
Implement a number guessing game where the computer generates a random number between 1 and 100, and the user has to guess it. Use functions to modularize your code and provide feedback to the user on whether their guess is too high, too low, or correct.
Banking Program – 6 XP
Implement the Quiz Game Program code at: https://youtu.be/8aW3tkIul-8?si=LMA2Yc4QBrHV5R7S