Guest User

Untitled

a guest
Jul 19th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. import random
  2. num=random.randint(1,100)
  3. print("I have chosen a number form 1 to 100, try to guess the number...")
  4. while(True):
  5. user_num=int(input("enter a number:"))
  6. if(user_num==num):
  7. print("you win")
  8. quit()
  9. if(abs(user_num-num)<=5):
  10. print("hot")
  11. elif(abs(user_num-num)<=15):
  12. print("warm")
  13. else:
  14. print("cold")
Add Comment
Please, Sign In to add comment