Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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.
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
Step: 1
Get Instant Access with AI-Powered Solutions
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