pyBegin / projects / dnd-dice
🎲

DnD Dice

A console dice roller for tabletop role-playing games. Pick a dice type (D4, D6, D8, D10, D12, D20, or D100) and it prints a random roll.

32 linesRunnable

DnD Dice

A console dice roller for tabletop role-playing games. Pick a dice type (D4, D6, D8, D10, D12, D20, or D100) and it prints a random roll.

How to run

python main.py

Requires Python 3.10+ (uses the match statement).

Dependencies

Standard library only (random).

Pyodide-runnable

Yes — it is a pure-stdlib console program using input, print, and random.