vendredi 19 février 2016

How do i stop the infinity loop for the if and elif part?

c = random.randint(0,5)
guess =int(input("="))
while True:
    if guess > c:
      print("you failed the test")
    elif guess <c: 
      print("you messed up")
    else:
      print("you are the one" + x)
      break  

Aucun commentaire:

Enregistrer un commentaire