Question: Code a program that will be called Guessing Game. The program will need to generate a number between 1 -100 and the user will have

Code a program that will be called "Guessing Game." The program will need to generate a number between 1 -100 and the user will have to guess the number correctly. The program should always keep track on the number of guesses entered by the user. Your program should include a menu with the following: 1. Easy [15 tries] 2. Medium [10 tries] 3. Hard [5 tries 4. Exit Easy mode will give the user 15 tries. Medium mode will give them 10 tries. Hard mode only 5 tries. Unlimited tries will give the user as many tries as they need to guess the number. You are to keep count of the tries the user makes on each difficulty mode and display the number of tries whether they guessed the number or not. The program should loop and let the user continue if they choose to and let the user change the difficulty mode before starting a new game. Your program needs to make use of a function. The function needs to receive the hidden number, and the guess of the user. The function will then check both values and return back to main if the guess is too high, too low, or the guess is the correct one. If the user runs out of tries. Your program should stop the user from continuing and display GAME OVER! The correct number was: [hidden number]" Also, your program should loop back to the main menu.

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 Programming Questions!