Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- allCombinations = []
- for x in range(6):
- firstDie = x+1
- for y in range(6):
- secondDie = y+1
- maxValue = max(firstDie, secondDie)
- allCombinations.append(maxValue)
- average = float(sum(allCombinations)) / float(len(allCombinations))
- print("Average roll: %s" % (average))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement