Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

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 

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

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Finite Mathematics and Its Applications

Authors: Larry J. Goldstein, David I. Schneider, Martha J. Siegel, Steven Hair

12th edition

978-0134768588, 9780134437767, 134768582, 134437764, 978-0134768632

More Books

Students explore these related Programming questions