Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Imports essential commands
- from random import *
- #Infinite Loop
- while True:
- #Random Integer Generator
- ans = randint(1,100)
- #Guess preset
- guess = 10000
- #Comparisons
- while guess != ans:
- guess = int(input("Guess a number form 1 to 100: "))
- if guess > ans:
- print("LOWER")
- if guess < ans:
- print("HIGHER")
- #Win message
- print("WINNER")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement