Advertisement
Guest User

exe3

a guest
Feb 26th, 2020
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. import random
  2.  
  3. nr = random.randint(0, 10)
  4. x = 500
  5. pas = 500
  6. X = 10
  7. gh = 0
  8. while x != nr and gh < X:
  9. x = int(input("guess"))
  10. gh = gh + 1
  11. if x < nr:
  12. print("mai mare")
  13. elif x > nr:
  14. print("mai mic")
  15. else:
  16. break
  17. if x == nr:
  18. print("Ai ghicit")
  19. else:
  20. print("Prea multe guessuri")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement