Question: Create a program in Python that stores an age and a weight (just set up two hard coded variables) and allow the user to try

Create a program in Python that stores an age and a weight (just set up two hard coded variables) and allow the user to try to guess your two numbers. Once the users two guesses are input your program must behave in the following way:

If both guesses are higher than the two numbers, print Both Higher

If both guesses are lower than the two numbers, print Both Lower

if both numbers are guessed correctly print Bingo and lastly, if none of the three conditions above is true print Game Over

Example (25 and 135 are the numbers):

Enter your guess for age: 27 Enter your guess for weight: 200 Both Higher

Enter your guess for age: 2 Enter your guess for weight: 800 Game Over

Enter your guess for age: 25 Enter your guess for weight: 135 Bingo

Enter your guess for age: 800 Enter your guess for weight: 2 Game Over

Enter your guess for age: 0 Enter your guess for weight: 9 Both Lower

Note that for every pair of guesses, we will have to run the program again.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!