Advertisement
Guest User

Untitled

a guest
Feb 13th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. import random
  2. number = [1,2,3,4,5,6,7,8,9,10]
  3. print "Guess the correct number to win the game"
  4. print "you have only three guess"
  5. a = random.choice(number)
  6. i = 3
  7.  
  8. while i > 0:
  9. num = input("Enter the number:")
  10. if num == a:
  11. print "head shot"
  12. break
  13. elif num > a:
  14. print "too high"
  15. else:
  16. print "too low"
  17. print "choice left:", i-1
  18. i = i - 1
  19. print "You loss the game"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement