Question: In Python: Write a program that presents the user with a random addition problem. The operands should be randomly selected by your program when it

In Python:In Python: Write a program that presents the user with a random

Write a program that presents the user with a random addition problem. The operands should be randomly selected by your program when it starts up. Your player is allowed to guess three times - if they guess correctly, they win and the program ends. If they guess incorrectly they should be told if the number they guessed was too high or too low and then be asked to guess another time. At the end of the program you shoud display the correct answer as well as how many attempts it took to guess that number. Here are a few sample runnings of your program Run #1 What is 8+2 10 Correct! You got it on try #1. Run #2 What is 1+77 0 That 's not correct Your answer is too Low. Try again What is 1+77 8 Correct! You got it on try #2. Run #3 What is 6+87 9 That 's not correct Your answer is too low. Try again What is 6+87 20 That 's not correct Your answer is too high. Try again What is 6+87? 14 Correct! You got it on try #3. Run #4 What is 4+6 11 That 's not correct Your answer is too high. Try again What is 4+67 9 That's not correct Your answer is too Low. Try again What is 4+67 12 Sorry, you're out of tries! The correct answer was 10

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!