Answered step by step
Verified Expert Solution
Question
1 Approved Answer
python 3 question the question marks need filled information i have been stuck on all day - Picode complete T wilig cue as instructed. 15
python 3 question the question marks need filled information i have been stuck on all day
- Picode complete T wilig cue as instructed. 15 points # Please try to understand above code. # Based on your understanding of the above code, you will be doing a fun exercise In this exercise you are supposed to make a simple game Following are the rules: You will run a while loop utill the game is finished You will create one random target number between 1 to 100 inclusively, # Ask user to guess the number # If the guess is high, the program says high, if it is low, it says low If match the game is finished # You will count how many steps a user will require to finish Note : You will see a try-except block for Exception handling. # Research about this to learn more. T # Now complete the code import random random.seed() attempts - 2 Winitialize the counter here goal_number - 20 #should be between 1 to 100 inclusiveley, don't print this, it is cheating while(True): We don't wan't to abort our program flow . So we want to catch sone errors if happened and handle try: guess_nun - int (input('Please Guess The Number : )) We want to confirm user gave us number between 1 to 100 assert guess_num in range(1,100) except: print('this is the correct assumption') # Print Appropriate message here # Here remember if high, say high, if low, say low and increment the counter # Remember you are supposed to use the continue statement whenever necessary # Google the use of continue statement and use it properly Note you may have multiple lines of code inside each block if necessary If : elif : else: print('Wow you did it in break attempts) attempts') File " Step 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