Question: Please solve the problem ( s ) alone. Write an algorithm before writing the code and include a short write - up of the algorithm

Please solve the problem(s) alone. Write an algorithm before writing the code and include a short write-up of the algorithm in a text file or PDF document along with the code. Remember to test your solution thoroughly. Code that does not work correctly or does not compile will lose credit. Please submit a digital copy, by the due date and time, via Canvas. The digital copy of your code should be a zip file containing the project folder named with your last name followed by the project number. For example, canetti1.zip would be my .zip file for project 01. Good luck!
Compose a programthat generates a random number for the user to guess. The program should use functions, parameters, and returns to make the code more organized and modular. No function should print information directly within the function (unless used for testing), all prints to the console for the user should be made by the main or original function call location. Useimport random. to generate your random numbers. In your written algorithm in addition to the write-up of your algorithm also include a flow chart that shows the logic of the conditional statements and loops (ensure paths are labeled properly).
The game should do the following
1: Generate a random number between 1 and 100 using the"generate_random_number"function.
2: Use a loop to allow the user to guess the random number. Display a message prompting the user to enter their guess.
3: Call the"check_guess"function with the random number and the user's guess. Display a message indicating whether the guess was correct or incorrect.
4: If the guess is incorrect, provide a hint (higher or lower) to help the user guess the number.
5: If the user has guessed incorrectly 2 times give an additional hint randomly selected between (even/odd number, multiple of 5, the number to the power of 2 is grater/less than 1,000)
5: Repeat steps 2-4 until the user guesses the correct number.
6: 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 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!