Download presentation
Presentation is loading. Please wait.
1
Hint idea 2 Split into shorter tasks like this.
Ask the user what level they want to play, collect and store the new input as “e”, “m”, or “h”. 2. Add the following code to catch any input we do not want the user to enter While level ! = “e” and level !=“m” and level !=“h”: Level = input(“Sorry. You must type in one of the letters ‘e’, ‘m’ or ‘h’\ne/m/h:”) 3. Use if, elif and else to sort out the upper limit and store the result in a suitable variable. 4. Move the code where the computer thinks of a number, to below this section and insert your upper limit variable in place of the appropriate argument. 5. Adjust the print () function below the # Start the game comment so that it outputs the correct information. 6. Adjust the code so that the output looks nice.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.