Guessing game using randint Python (Programming) A person is playing a guessing game in which they have 3 guesses to figure out the computer's secret
Guessing game using randint Python (Programming)
A person is playing a guessing game in which they have 3 guesses to figure out the computer's secret number which will be between 1 and 20 inclusive (use randint to generate the number). If they guess the number correctly on the first guess the program should stop making them guess and they should get 10 points. If they guess the number correctly on the second guess the program should stop making them guess and they should get 5 points. If they guess the number correctly on the third guess, they should get 1 point. After an incorrect guess tell the user if their guess was too high or too low. If they fail to get the number correct after 3 guesses they get 0 points. Be sure to tell them what score they got, and show the computer's secret number. Ask the user if they want to continue playing the game. If they choose to play again, start at the beginning.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started