ayshan

number guessing

Mar 29th, 2019
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. from random import *
  2. a=randint(1,9)
  3. b=0
  4. count=0
  5. while b!=a:
  6.  
  7. b=int(input("guess"))
  8. count+=1
  9. if b<1:
  10. print("less")
  11. elif b>9:
  12. print("high")
  13. elif b==a:
  14. print("exactly")
Add Comment
Please, Sign In to add comment