import random
playing = True
number = str(random.randint(0,9))
print("I will generate a number from 0 to 9, and you have to guess the number one digit at a time!")
print("The game ends when you get 1!")
while playing:
guess = input("Give me your best guess!")
if number == guess :
print("You win the game")
print("The number was", number)
break
else:
print("Your guess isn't correct!.Please try again!.\n")
To embed this project on your website, copy the following code and paste it into your website's HTML: