June 2021
Beginner
432 pages
9h 9m
English
Dungeons & Dragons and other tabletop role-playing games use special dice that can have 4, 8, 10, 12, or even 20 sides. These games also have a specific notation for indicating which dice to roll. For example, 3d6 means rolling three six-sided dice, while 1d10+2 means rolling one ten-sided die and adding a two-point bonus to the roll. This program simulates this dice rolling, in case you forgot to bring your own. It can also simulate rolling dice that don’t physically exist, such as a 38-sided die.
When you run diceroller.py, the output will look like this:
Dice Roller, by Al Sweigart al@inventwithpython.com ...Read now
Unlock full access