You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
print('I\'m glad to meet you! {} \nLet\'s play a game with you, I will think a number between 1 and 10 then you will guess, alright? \nDon\'t forget! You have only 3 chances so guess:'.format(player_name))
while number_of_guesses < 3:
guess = int(input())
number_of_guesses += 1
if guess < number:
print('Your estimate is too low, go up a little!')
if guess > number:
print('Your estimate is too high, go down a bit!')
if guess == number:
break
if guess == number:
print( 'Congratulations {}, you guessed the number in {} tries!'.format(player_name, number_of_guesses))
else:
print('Close but no cigar, you couldn\'t guess the number. \nWell, the number was {}.'.format(number))