Question: Begin by setting up three variables, target, number _ guess and player _ guess, with initial values of 2 , 0 and 0 , respectively.

Begin by setting up three variables, target, number_guess and player_guess, with initial values of 2,0 and 0, respectively. Subsequently, establish a while loop that continues to iterate as long as the variable number_guess is less than or equal to 3. Inside the loop, first, increment the value of number_guess by one. Then, using the input function ask the player to make a guess and assign it to the appropriate variable. Then, employ conditional statements to print "Your guess it too low !" when the variable player_guess is less than the variable target, "Correct guess ! You won" when it is equal to target, and "Your guess it too high !" when it is higher than the variable target.

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!