Question: using python You have been asked to write a program to keep children of all ages busy on a long trip. The program will allow
using pythonYou have been asked to write a program to keep children of all ages busy on a long trip. The program will allow the user to play the high/low game on a computer. The program will generate a random number from 1- 32 inclusive (I will show you show to do this.). If the user's guess is outside the range specified, tell the user so and ask for another try, but don't count it as a try until the guess is within the range (This is a validation loop.). If the user's guess is too high or too low, the computer will tell them which and allow the user another guess. If the user guesses the correct number, the program will say so, print the number of tries, and stop asking for guesses. The program will then ask if the user wants to play again. If yes, a new random number will be generated At the end of the last game, the computer will display how many games were played. See the sample below. You will need to use two different types of while loops, if/elif/else, and the random function among other things
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
