Higher or Lower Game

Higher-Or-LowerFor this challenge you will design and write a program to play against the computer.
The computer will display a random number between 1 and 1000. It will then ask the end-user whether they believe the next number will be higher or lower. The program will then generate the next number. If the user guessed right (e.g. the next number is higher or lower than the previous one) then the user scores one point. The game stops when the user guesses it wrong.

Learning Objectives


By completing this challenge you are going to use selection (IF statements) and iteration (While loop). You will use comparison operators such as > , < and == to compare numbers. You will use variables to store the value of random numbers, retrieve user input and keep and increment a score as the game progresses.

Complete the Python Code


Did you like this challenge?

Click on a star to rate it!

Average rating 2.3 / 5. Vote count: 3

No votes so far! Be the first to rate this post.

As you found this challenge interesting...

Follow us on social media!