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 > or < 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

Share Button
Posted in Computer Science, Python - Intermediate, Python Challenges

Our Latest Book

Follow this blog