Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

XML Data Management Native XML And XML Enabled Database Systems

Authors: Akmal Chaudhri, Awais Rashid, Roberto Zicari, John Fuller

1st Edition

ISBN: 0201844524, 978-0201844528

More Books

Students also viewed these Databases questions