Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #By JZQR
- import random
- def rnd():
- s = random.randint(1, 6)
- return s
- z = 0
- x =1
- print("Rules: ")
- print("1. You start with 1 point.")
- print("2. If Rolled number = 1, Yours point = 0, and the game ends.")
- print("3. If Rolled number = 2 or 3 or 4, Yours point = point * 2, and the game ends.")
- print("4. If Rolled number = 5 or 6, Yours point = point * 2, and You can Rolled number again.")
- print("-------------")
- print("Start Game")
- print("Points: 1")
- print("-------------")
- y = 6
- while y == 5 or y == 6:
- y = rnd()
- z += 1
- if y == 1:
- x = 0
- print("Rolled number: ", y)
- print("Points: ", x)
- print("Round ", z)
- print("-------------")
- if y == 2 or y == 3 or y == 4:
- x = x*2
- print("Rolled number: ", y)
- print("Points: ", x)
- print("Round ", z)
- print("-------------")
- if y == 5 or y == 6:
- x= x*2
- print("Rolled number: ", y)
- print("Points: ", x)
- print("Round ", z)
- print("-------------")
- print('End Game')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement