Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import json
- import random
- import sys
- import os
- num = random.randint(0,10)
- while(True):
- guess = int(input("Guess again:"))
- if guess < num:
- print("Your guess is too low.")
- elif guess > num:
- print("Your guess is too high.")
- else:
- print("You got it right!")
- break;
- ans = input('do you want to play again?(y/n)')
- if ans == "n":
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement