Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- dice1 = 0
- dice2 = 0
- priorRoll = -1
- while True:
- dice1 = random.randint(1,6)
- dice2 = random.randint(1,6)
- sum = dice1 + dice2
- print(f"Roll: total = {sum}")
- if sum in [7, 11, priorRoll]:
- print(f"Woah!!! With a {sum} You WIN!!!!!!!")
- break
- elif sum in [2, 3, 12]:
- print(f"Sorry with a {sum} You LOSE :(")
- break
- priorRoll = sum
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement