Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Petals on the Rose (new)
- from random import randint
- while True:
- dice = []
- ans = 0
- for h in range(0, 5):
- a = randint(0, 6)
- dice.append(a)
- print(a)
- for die in dice:
- if die % 2 == 1:
- ans += die - 1
- guess = int(input("What is your guess? "))
- if guess == ans:
- print("Yay! You win!")
- break
- else:
- print("Try again!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement