Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- def rollDice():
- dice1 = random.randint(1,6)
- dice2 = random.randint(1,6)
- dice3 = random.randint(1,6)
- dice4 = random.randint(1,6)
- dice5 = random.randint(1,6)
- # For testing 50
- # dice1 = 1
- # dice2 = dice1
- # dice3 = dice1
- # dice4 = dice1
- # dice5 = dice1
- if (
- dice1 == dice2 and dice2 == dice3 and
- dice3 == dice4 and dice4 == dice5
- ):
- return 50
- else:
- return 0
- print ("The result is:",rollDice())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement