Created
July 25, 2012 11:29
-
-
Save fcicq/3175644 to your computer and use it in GitHub Desktop.
fcicq's dice
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import random | |
| # E = 129.875 | |
| def dice(): | |
| s = random.randint(1, 20) | |
| if s <= 2: return random.randint(1, 20) | |
| if s <= 8: return random.randint(21, 50) | |
| if s <= 14: return random.randint(51, 99) | |
| if s <= 17: return random.randint(100, 200) | |
| if s <= 19: return random.randint(201, 500) | |
| return random.randint(501, 1024) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment