Question: Create an algorithm for playing a guessing game where the user tries to guess a random number x between 1-100. You can assume that a

 Create an algorithm for playing a guessing game where the user

Create an algorithm for playing a guessing game where the user tries to guess a random number x between 1-100. You can assume that a variable called x already exists and has been initialized to some random value between 1 and 100. Your algorithm only needs to handle getting guesses, giving hints, and determining whether the game is over or should continue. After each incorrect guess, a hint should be given to the user indicating whether they should guess higher or lower. The game should repeat until the user guesses the correct number. Do not worry too much about specific terminology - as long as someone with absolutely no knowledge about what the game is can read through your algorithm and play the game correctly, your algorithm is good. Save your algorithm in a text file called a1q1.txt and add it to your assignment! .zip file

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!