Question: write an algorithm and code for the following The game should do the following 1 : Generate a random number between 1 and 1 0
write an algorithm and code for the following The game should do the following
: Generate a random number between and using thegeneraterandomnumber"function
: Use a loop to allow the user to guess the random number. Display a message prompting the user to enter their guess.
: Call thecheckguess"function with the random number and the user's guess. Display a message indicating whether the guess was correct or incorrect.
: If the guess is incorrect, provide a hint higher or lower to help the user guess the number.
: If the user has guessed incorrectly times give an additional hint randomly selected between evenodd number, multiple of the number to the power of is graterless than
: Repeat steps until the user guesses the correct number.
: Once the user guesses the correct number, display the number of attempts it took to guess correctly.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
