so basically i was doing this random number guessing game thing for school and i wrote out the code they gave me everyone elses code worked but mine didnt does anyone know why???
here's the code:
import random
number = random.randint(1, 10)
while guess <= number:
guess = int(input("Please enter a number!\n"))
if guess <= number:
print("Higher!!!")
guess = int(input("Please enter a number\n"))
else:
print("Lower!!!")
guess = int(input("Please enter a number\n")
if guess == number:
print("Awesome! You got it!!!")
Aucun commentaire:
Enregistrer un commentaire