vendredi 3 septembre 2021

Can anyone correct this code for me please I am new? [closed]

import random

random = random.randint(1,99)

print(random)
answer = int(input("Guess a number"))

while answer != random:

 if answer > random :
  print(f"Your answer is less then {answer}")
  
 elif answer < random:
  print(f"Your answer is more then {answer}")
  
 elif answer == random:
  print(f"The answer {answer} is correct")
  pass



Aucun commentaire:

Enregistrer un commentaire