#this code is designed by codenation.
#9:30 20/11/2020
print("**THIS IS A NUMBER GUESSING GAME**")
import random
win=random.randint(1,100)
guess= 1
num=int(input("enter a number between 1 to 100 :"))
game_over=False
while not game_over:
if num==win:
print(f"you won! congratulations on completing the game ,you guessed {guess} times.")
game_over = True
else:
if num < win:
print("too low")
else:
print("too high")
guess += 1
num=int(input("guess again :"))
continue
#this code is developed by codenation.
Comments
Post a Comment