Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- x = (10)
- number = random.randint(1,x)
- while number != 0:
- guess = int(input(f"Guess a number between 1 and {x}: "))
- if guess < number:
- print("Sorry, too low")
- elif guess > number:
- print("Sorry, to High")
- elif guess == number:
- print(f"Good job, it was {number}")
- number = (0)
Advertisement
Add Comment
Please, Sign In to add comment