Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n1 = random.randrange(1,7)
- n2 = random.randrange(1,7)
- initialresult = n1 + n2 #want to display the result
- if initialresult in [7,11]
- print("Throw total: {} ... you lost!".format(initialresult))
- if initialresult in [2,3,12]
- print("Throw total {} .. you won!".format(initialresult))
- #if roll for point is pressed
- while not done:
- n1 = random.randrange(1,7)
- n2 = random.randrange(1,7)
- result = n1 + n2
- if result in [7,11]:
- print("Throw total: {} ... you lost!".format(result))
- break
- if result in [2,3,12]:
- print("Throw total {} .. you won!".format(result))
- break
- if result == initialresult:
- print("Throw total: {}.. you lost!".format(result))
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement