Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please used in basic python language! thank you Write a number (i.e., integer) guessing program. Note that we have set a target integer for you
please used in basic python language! thank you
Write a number (i.e., integer) guessing program. Note that we have set a target integer for you already (but your program should work if this target number changes). Ask the user to input a guess, and then give a feedback for each guess, such as "Too big", "Too small", or "You got it!". Allow 5 trials only, and if a user failed all 5 trials, print "You've used up 5 trials. Try next time!". A sample output is provided below for your information. Please guess a number: 1 Too small Please guess a number: 30 Too big Please guess a number: 25 Too big Please guess a number: 23 You got it! or Please guess a number: 1 Too small Please guess a number: 1 Too small Please guess a number: 1 Too small Please guess a number: 1 Too small Please guess a numb Too small You've used up 5 trials. Try next timeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored 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