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 problems alone. Write an algorithm before writing the code and include a short writeup 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, canettizip would be my zip file for project 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 writeup 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
: 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
