Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

App Inventor

Authors: David Wolber, Hal Abelson

1st Edition

1449397484, 9781449397487

More Books

Students also viewed these Programming questions

Question

Under what conditions are two qualitative variables independent?

Answered: 1 week ago

Question

What is the cerebrum?

Answered: 1 week ago