Question: Write a program that plays number-guessing game from 1-10. The user can guess until they get it right AND count the number of tries it

Write a program that plays number-guessing game from 1-10. The user can guess until they get it right AND count the number of tries it takes them to guess it. That means it will keep looping as long as the guess is different from the secret number.

Write a program that plays number-guessing game from 1-10. The user can

Task 1: 1. Write a program that plays number-guessing game from 1-10. The user can guess until they get it right AND count the number of tries it takes them to guess it. That means it will keep looping as long as the guess is different from the secret number. I have chosen a number between 1 and 10. Try to guess it. Your guess: 5 That is incorrect. Guess again. Your guess: 4 That is incorrect. Guess again. Your guess: 8 That is incorrect. Guess again. Your guess: 6 That's right! You're a good guesser. It only took you 4 tries

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 Databases Questions!