Question: Plan and implement a program that generates a random number between 1 and 10 and then requests the player's name. The player should then be
- Plan and implement a program that generates a random number between 1 and 10 and then requests the player's name.
- The player should then be prompted to guess the number.
- If the number is greater than the generated number the program should let the player know that his guess was too high; if less, then let the user know that his guess was too low.
- Continue to give the player additional attempts until correctly guessing the generated number.
- Let the player know how many attempts it took them to correctly guess the answer.
- Using a random library function to generate the number to guess, try to modularize the rest of the program into logical parts.
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
