South Plantation High School · Procedural Programming with Python

Paladin Dice Duel

Download the template · Follow the steps in VS Code · Upload · 30 points

Instructions

The information on this page is not stored. If you start an assignment, you must finish it. This page does not save your progress. Your program is safe in VS Code, but your score on this page disappears if you leave or refresh.

What you are building

You will build a dice game called Paladin Dice Duel. You and the computer each roll a die. The higher roll wins the round. The first player to win 3 rounds wins the game, and the winner gets 2 random prizes.

You do not have to figure it out alone. The template file walks you through 16 short steps. Each step tells you exactly what to type and shows an example.

What you need

  • Visual Studio Code with the Python extension installed.
  • The template file from this page (you get it after you click Start Assignment).

How it works

  1. Sign in: enter your first name, last name initial, and class period. Click Start Assignment. Your start time is recorded.
  2. Download the template file and open it in VS Code.
  3. Follow the steps in the green comments. Type your code under each YOUR CODE: line. Save and run after every step.
  4. Upload your .py file here. The checklist shows your points for every step. Click Hint on any step for help.
  5. Fix and re-upload as many times as you want.
  6. Submit for your final score. Turn in your score report the way your teacher tells you.

What a finished game looks like

======================================== PALADIN DICE DUEL ======================================== What is your name? Maya Welcome, Maya! Today you face Dice Bot How many sides should the dice have? (6 to 20) 8 Great! Rolling a 8 sided die. Round 1 Press Enter to roll... Maya rolled 7 Dice Bot rolled 3 You win the round by 4.0 points! Score: Maya 1 - Dice Bot 0 Round 2 Press Enter to roll... Maya rolled 2 Dice Bot rolled 6 Dice Bot wins the round by 4.0 points! Score: Maya 1 - Dice Bot 1 ... more rounds ... ======================================== The winner is Maya! Maya average roll: 5 Maya wins a crown and a pizza party

Blue text is what the player types. Your game will roll different numbers every time.

Grading rubric: 30 points

Each step in the template is worth points. The checker reads the structure of your code. Words inside comments or quotes do not count, so deleting the # in front of an example is not enough if the indentation is wrong. Your code is never run on this page.

StepWhat the checker looks forPoints
Total30

Tips for success

Student Information

Reminder: nothing on this page is saved. Once you click Start Assignment, plan to finish before you leave or refresh the page.