Part 0: Set Up
There are two things you’ll need to set up before you can begin working on the project: the version of Python you’re using and the starter code.
Python Version
To make sure your Python has all the expected functionality, you’ll need to be using at least Python 3.10.
Check the version of Python that your computer has running by pasting the following line of code into your terminal.
For Windows:
py --version
For Mac:
python3 --version
An example of the result from executing the code above should look like:
(For Windows)
PS C:\Users\Oski> py --version
Python 3.10.x
(For Mac)
oski@Oski-MacBook-Air ~ % python3 --version
Python 3.10.x
If your version number is smaller than 3.10 (starts with 3.9 or something smaller), check out this nice How to update python page or go to OH or lab for help upgrading your Python version.
The Starter Code
To mimic the majority of real-world coding projects, for this project, you’ll be working with an existing codebase, where some functions and classes have already been defined for you. To begin, download the starter ZIP file here!
There are several files in the ZIP file, but you’ll only be editing models.py
and board.py
. If you’re curious, you can open and read the other files, but that isn’t necessary to complete the project. Do not edit any other files. If you think you have by accident, go to OH for help!
The starter code also contains a local grader that you can use to run some provided sanity-check tests on your code (instructions are in the relevant sections). These local tests are a good barometer for how your implementation is doing, but there are additional randomized tests in the PrairieLearn autograder we expect you to pass to get 100%. Keep in mind that you’ll still need to pass the tests on the PrairieLearn autograder for credit.
Note: Do make sure that you’re not modifying function signature (how many/what types of arguments a function takes in, the name of a function, how many/what types of arguments a function outputs) as this could cause trouble when running the PL autograder.
Nice work! Now you’re ready to start coding.