fork download
  1. import random
  2.  
  3. goal = rand(1,100)
  4.  
  5. guess = 0
  6.  
  7. while guess != goal:
  8. guess = int(input("Please guess a number between 1 and 100:, guess)
  9. if guess < goal:
  10. print("Too low, please try again.")
  11. else if guess > goal:
  12. print("Too high, try again.")
  13. else:
  14. print("Well done!)
  15. print()
  16. print("See you later!")
Runtime error #stdin #stdout 0.02s 5760KB
stdin
Standard input is empty
stdout
Standard output is empty