Advertisement
Karielsys

Untitled

Jun 21st, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. import random
  2.  
  3. def get_random_int():
  4.     return random.randint(1,101)
  5.  
  6. if __name__ == "__main__":
  7.     num_to_guess = get_random_int()
  8.     while True:
  9.         input = input("Reading input: ")
  10.         input = int(input)
  11.         if(input == num_to_guess):
  12.             print("Output: YAY")
  13.             break
  14.         elif input > num_to_guess:
  15.             print("Output: LOWWWWER")
  16.         else:
  17.             print("Output: HIGHERRR")
  18.     print("Output: GAME OVER")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement