Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- number = [1,2,3,4,5,6,7,8,9,10]
- print "Guess the correct number to win the game"
- print "you have only three guess"
- a = random.choice(number)
- i = 3
- while i > 0:
- num = input("Enter the number:")
- if num == a:
- print "head shot"
- break
- elif num > a:
- print "too high"
- else:
- print "too low"
- print "choice left:", i-1
- i = i - 1
- print "You loss the game"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement