Class Resources

for HCC classes taught by Rylan Schubkegel

Course Homepage

Dice Rolling Simulator

Due 11/6 at 11:59

A common way to add excitement to games is to add randomness. For board games, this is usually in the form of dice; in this project, you will create a program that emulates rolling dice.

Your program must satisfy the following specifications:

Reading a File

When trying to read a file that does not exists, you will get an error like this:

FileNotFoundError: [Errno 2] No such file or directory

One way to avoid this is by checking if the file exists by using a function in the os module:

import os
if os.path.exists("my_file.txt"):
  # TODO read the file

Submit Assignment

When your program meets the requirements, download and submit your .py file here:

Submit Assignment