Dungeons & Dragons


MicroProject Overview

Dungeons & Dragons is a tabletop role-playing game in which you and your friends play a group of adventurers and seek to slay monsters, meet NPCs, and become more powerful in a fantasy world. One of the most recognizable aspects is the dice used to determine the outcome of events. The dice are designated by "d" followed by the number of sides. For example, a d6 is a standard 6-sided die. There's also a d4, d8, d10, d12, d20, and d% (the same shape as a d10 but with 00, 10, 20, etc). Fun fact: most of the dice are platonic solids!

In this MicroProject, you will create simulations of dice rolls and explore the statistics of the rolls. Let's nerd out!

MicroProject in Visual Studio Code
MicroProject in Visual Studio Code
Frequency bar chart of a d20 roll with advantage
Frequency bar chart of a d20 roll with advantage
Frequency bar chart of the standard damage roll a greatsword wielding paladin with +3 strength
Frequency bar chart of the standard damage roll a greatsword wielding paladin with +3 strength
Frequency bar chart of the divine smite damage roll
Frequency bar chart of the divine smite damage roll

First Time Doing a MicroProject?

Each MicroProject starts with a notebook that we provide to you to get started! You will need to configure a git repository to connect to our `microprojects` remote where we release the starter notebook.


Fetch the Initial Files

In your terminal, navigate to your GitHub repository and merge the initial files by running the following commands:

git fetch microprojects
git merge microprojects/microproject-dungeons-and-dragons --allow-unrelated-histories -m "Merging initial files"

Complete the Notebook

If the commands above were successful, you have merged in the initial files to start on the MicroProject.

  • Find the new microproject-dungeons-and-dragons folder.
  • Open microproject-dungeons-and-dragons.ipynb and complete the MicroProject!

Commit and Grade Your Notebook

Once you have finished your notebook, you must use the built-in GitHub Action to preform automated grading of your MicroProject notebook! You will need to commit your work and then manually run the GitHub Action.

Commit Your Work

To commit your notebook, run the standard git commands in your terminal:

git add -u
git commit -m "microproject completed"
git push

Grade Your Notebook

To grade your notebook, you will need to visit your GitHub repository in your browser.

  • Visit your GitHub repository in your browser
  • Click on the "Actions" tab
  • Under "Workflows", find the workflow for this microproject
  • Click the "Run Workflow" in the blue box, and then the green "Run Workflow"
  • After about 10 seconds, you should see a new job that has started running
    • You can click on the job to watch it run in real-time
    • It will take ~1 minute to run and grade
  • Once the running is complete, the autograding summary will be available!