There are only two hard things in Computer Science: cache invalidation and naming things.
Phil Karlton
These resources remain constant throughout the entirety of the course.
| [email protected] | Instructor email. |
| 360-840-1401 | Instructor phone number. |
| Class Syllabus | Includes an overview of the topics covered, grading criteria, and participation expectations. |
| Replit | Online IDE used for coding; can be accessed from any computer via Google account or username/password. |
| VS Code | IDE used for coding; runs locally as a desktop application. Requires Python interpreter to be installed on your machine. |
| Python | Python interpreter that runs .py files on your local machine. |
| Pygame | Documentation for the Pygame library which is used for making games in Python. |
These resources are updated weekly as the course progresses.
Make sure to check this section each week!
Time estimates are calculated based on the assumption that a student needs 75 hours over 16 weeks (4.7 hours per week). Each week includes:
The color coding indicates:
| Date | Topic(s) | Resources | Time Estimate |
|---|---|---|---|
| Week 1 Sep 04–10 |
| 35 min | |
| Week 2 Sep 11–17 |
| 3 hr 25 min | |
| Week 3 Sep 18–24 |
| 4 hr 38 min | |
| Week 4 Sep 25–Oct 01 |
| 4 hr 21 min | |
| Week 5 Oct 02–08 |
| 2 hr 20 min | |
| Week 6 Oct 09–15 |
| 2 hr 19 min | |
| Week 7 Oct 16–22 |
| 2 hr 0 min | |
| Week 8 Oct 23–29 |
| 3 hr 5 min | |
| Week 9 Oct 30–Nov 05 |
| 2 hr 24 min | |
| Week 10 Nov 06–12 |
| 3 hr 20 min | |
| Week 11 Nov 13–19 |
| 2 hr 16 min | |
| Week 12 Nov 20–26 |
| 28 min | |
| Week 13 Nov 27–Dec 03 | N/A | | 0 min |
| Week 14 Dec 04–10 |
| 2 hr 34 min | |
| Week 15 Dec 11–17 |
| 2 hr 33 min | |
| Week 16 Dec 18–24 |
| 2 hr 0 min | |
| Week 17 Dec 25–31 | N/A | | 0 min |
| Week 18 Jan 01–07 | N/A | | 0 min |
| Week 19 Jan 08–14 |
| 2 hr 0 min | |
| Week 20 Jan 15–21 | N/A | | 0 min |
| Cumulative | N/A | N/A | 76 hr 58 min |
| No resources assigned yet | |||
Click a cell to copy it into ThinkWave. Description copies the assignment HTML.
| Name | Assigned | Due | Points | Description |
|---|---|---|---|---|
| Intro Survey | 4 Sep 2024 | 4 Sep 2024 | 2 | click to copy Fill out the intro survey to let me know a little bit about you and your experience with computer science. |
| ThinkWave Check-in | 4 Sep 2024 | 11 Sep 2024 | 1 | click to copy Step One: Log in to ThinkWaveYou should be able to login to ThinkWave and see your class list. Step Two: Take a ScreenshotTo make sure everything in ThinkWave is hooked up, please save a screenshot of your class list or dashboard. Knowing how to take a screenshot will be important if there ever comes a time that you need help with an assignment. Step Three: Send Me an EmailTurn in your assignment by sending me an email at [email protected]. Make sure to attach your screenshot to the message! Email is the primary way you can communicate with me throughout the semester. Please send the message from your student email. This email will be used for additional platforms required for this class (Google Form submissions, JDoodle, etc.). |
| Hello, World! | 12 Sep 2024 | 18 Sep 2024 | 3 | click to copy A classic first program to test that your toolchain (runtime environment, compiler, IDE, etc.) is set up properly is the “Hello, World!” program.
See Wikipedia page to read more about it. 1. Create a JDoodle AccountAn integrated development environment (IDE) is a program that provides text editing, syntax highlighting, file explorer, debugging tools, and other things that are useful for coding. For this class, we will use JDoodle as our IDE which runs in a web browser and allows you to access your work across multiple computers. Visit www.jdoodle.com and set up an account. I recommend using your student Gmail account so you don’t have to remember another password.
2. Create a New Python ProjectThere are several ways to create a new project, a few examples are shown below.
When you find a button that allows you to create a new project, make sure the project settings match what is listed below.
3. Print “Hello, World!”Type the following code in your editor and press the “Execute” button at the top right of the screen. You should see an “Input/Output” window appear with the text “Hello, World!” in the terminal.
4. Save Your ProjectPress the save icon, give your project a descriptive name, and press “Save.” Make sure to save often when you are working!
5. ExperimentYou can do a lot by just printing to the terminal! Here are some ideas to get started:
6. Turn it InTo turn in your project, download the Python file by pressing the “Save (to local file)” button.
Upload the That’s it! You’ve completed your first programming project 🎉 |
| Make a Quiz | 12 Sep 2024 | 18 Sep 2024 | 12 | click to copy Make a quiz about something you’re passionate about! Sports, music, games… the sky is the limit. Your quiz should follow these specifications:
You will use the
Here are some resources to learn about these new concepts:
Remember: to make your JDoodle terminal interactive, toggle the "Interactive" checkbox in the "Input/Output" tab.
When you’ve finished, have a friend or family member try out the quiz! When you’re happy with it, you can submit your assignment here: |
| Guess the Number | 19 Sep 2024 | 25 Sep 2024 | 12 | click to copy Make a simple game to practice using loops! Your program must meet the following specifications:
Additional Challenges (not required)
Random NumbersTo generate a random number, you can use the built-in module
Example CodeSince I did not record the activity/project time during class, here is the code that we “pair programmed” to help you out. Make sure to fill out the
SubmitMake sure you test your program before submitting! |
| Setup Replit | 19 Sep 2024 | 19 Sep 2024 | 3 | click to copy Time for a new development environment! I apologize for changing our tooling so much, I am trying to find an IDE that is free, simple, and performant. Hopefully Replit will be the last one 🤞🏻 Replit is has a free tier that allows up to 3 projects. Since we will have more than 3 projects, each project will be a separate file in a single project. That means all the assignments for the semester will be in a single project.
1. Sign UpGo to replit.com and click “Sign Up.”
Create an account using your Google account.
2. Create a ProjectFrom the dashboard, you will see a blue button at the top of the screen that says ”+ Create Repl”—press that to show the new project dialog.
Select Python as the project language. Give the project a descriptive title, such as “HCC Comp Sci.” Press “Create Repl” to enter the editor.
3. Add Project FileYour editor will look similar to this to start. If you press “Run” you should see the “Console” tab (a console is type of terminal) appear with “Hello, World!” printed to the screen.
For each project going forward, you will create a new file by pressing the “New file” button at the top left of the screen. Use lowercase and underscores to write a file name that matches the project. Make sure to end the file name with the In my example, I created the
This file is where you will write all your code. For the “Guess the Number” project, you can copy and paste the example code from the assignment page.
If you try to run your code, you will still see “Hello, World!” printed to the console. That is because the Replit environment looks for a file called In
Make sure it matches the file name exactly. When you press “Run” you will see the code from the
In future projects, you will comment out the import in
SubmitThere is no submission for this assigment 🎉 If you have any trouble with the steps above, reach out as soon as possible! |
| Password Generator | 26 Sep 2024 | 2 Oct 2024 | 12 | click to copy A good safety practice is to randomly generate your passwords; this makes it very difficult for a hacker to guess your password. In this assignment, you will implement your own password generator. Your program must meet the following specifications:
|
| Make a Quiz: Revised | 26 Sep 2024 | 2 Oct 2024 | 12 | click to copy Previously you made a quiz game. In this project, you will refactor the project and expand it with new features.
Your revised quiz must still meet these original specifications:
Additionally, you must refactor the code to use the following techniques:
Remember, new assigments should not have their own Replit projects. There should be a new file for this project that is imported in |
| Tic Tac Toe (part 1) | 3 Oct 2024 | 9 Oct 2024 | 12 | click to copy Previously your projects have been simple enough to complete in one week, but now it’s time to turn up the heat 🔥 During the next two weeks, you will program a game of Tic, Tac, Toe to test your knowledge of functions. This week, you must submit a program that matches the following specifications:
Printing Without a NewlineSo far, each time we have called
Which prints the following output:
Submit Assignment |
| Tic Tac Toe (part 2) | 10 Oct 2024 | 16 Oct 2024 | 12 | click to copy In part 1 of this project, you created the functions necessary to print a game board; in this part you will add the game state and player input 🕹️ Your program must follow these specifications:
Organize the ProjectPrevious projects have been simple enough to keep everything in a single file. Since this project is bigger, we are going to split it into multiple files!
Now, you can use the imported function to print the Game StateThe current “state” of the game is stored in the
As the game progresses, each player will add pieces to the board (represented by
Submit AssignmentWhen your program meets the requirements, download and submit |
| Tic Tac Toe (part 3) | 17 Oct 2024 | 23 Oct 2024 | 12 | click to copy In part 1 of this project, you created the functions necessary to print a game board. In part 2 you added the game state and player input. Now, it’s time to add the final touch: winning! 👑 Your program must follow these specifications:
Checking the WinnerYour new function
Thare are several ways that you can check whether a player has three pieces in a row, it doesn’t really matter how you do it. The important thing is that a player can win, lose, or tie to end the game. Just make sure to test your code before submitting! Submit AssignmentWhen your program meets the requirements, download and submit |
| Running Python Locally | 24 Oct 2024 | 24 Oct 2024 | 6 | click to copy Replit is a cloud service, meaning your code runs on someone else’s machine. However, if you run out of “Development Time” (bottom left corner of dashboard) and you don’t want to pay for the service, it’s time to set up your computer to run Python locally.
Install PythonA Python interpreter reads a line of Python, converts it to bytecode, then executes it in the Python Virtual Machine (which is machine code that your computer can understand). In order to run any Python program, you need an interpreter. Go to the downloads page on python.org and download the latest Python version (big yellow button). When the installer finishes downloading, run it. Make sure “run as admin” is unchecked and “add to PATH” is checked. Run the default installation (not custom install). When the installation finishes, you can verify that Python is installed by opening Windows Command Prompt and running the following:
If you have any issues with this step of the process, send me an email and I can help walk through the process. Install VS CodeYou don’t need anything special to write Python code. However, an integrated development environment (IDE) makes it much easier. OneCompiler, JDoodle, and Replit are IDEs that include syntax highlighting, code completion, and a simple UI to run your code. However, they are limited because they run in your browser (as a cloud application). Visual Studio Code (VS Code) is an IDE that you can run on your own computer. Go to code.visualstudio.com and download VS Code. When the installation finishes, run the application. Install the Python extension to enable syntax highlighting, code formatting, and other features. When the installation finishes, you are now ready to code! Organizing ProjectsTo keep everything organized, I recommend keeping your Python files in a single folder. For example, You can now create a python file in the “Explorer” tab (two pages icon, left side), write some code in it (e.g.
Resolving IssuesThe quickest and easiest way to resolve issues is to contact me. I am happy to set up a time to walk through the installation process or help you transfer projects from Replit. |
| Dice Rolling Simulator | 31 Oct 2024 | 6 Nov 2024 | 12 | click to copy 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 FileWhen trying to read a file that does not exists, you will get an error like this:
One way to avoid this is by checking if the file exists by using a function in the
Submit AssignmentWhen your program meets the requirements, download and submit your |
| Guess the Number - High Scores | 7 Nov 2024 | 13 Nov 2024 | 18 | click to copy To practice loading and saving files, you will extend the Guess the Number project to incorporate persistent high scores. I highly recommend that you make a copy of the project and edit the copy instead of editing the original project directly. Your program must meet the following requirements:
It’s up to you to decide how to name the files, as well as which module you prefer to save and load the data with. If you use the Review the week 9 slide deck for an example of how to use Extra Challenges (optional)
Submit AssignmentWhen your program meets the requirements, download and submit your |
| Choose Your Own Adventure | 14 Nov 2024 | 27 Nov 2024 | 12 | click to copy Choose Your Own Adventure (CYOA) novels allow readers to make choices that impact the story. In this project, you will make your own CYOA game. Your program must meet the following specifications:
This is a great chance to flex your creative muscles 💪🏻 Have fun with it!! Extra Challenges (optional)
Example StoryHere is a simple example of a 2-page story dictionary (remember, yours must be at least 10 pages):
Example Output
Submit AssignmentWhen your program meets the requirements, download and submit your |
| Flappy Bird 1 | 5 Dec 2024 | 11 Dec 2024 | 12 | click to copy Flappy Bird is a classic game where the player controls a bird and tries to avoid obstacles. In this assignment, you will create a simple version of Flappy Bird using Python and Pygame. The project will be split into three weeks but you must submit the program each week. This week, you will get familiar with drawing graphics using basic shapes.
PygamePygame is a Python library for creating games. It provides a set of functions and classes that make it easy to create graphics and sound for your game. Install for Replit
Open
Next time you run a project, Replit will automatically install the required packages. Install for VSCodeOpen Command Prompt (View > Terminal or Ctrl + `) and run the following:
Now you can import the Project StructureThis project will be larger than previous projects which makes it important to organize the code. Here is the basic structure your program should follow:
Here is a basic template for you to start with:
Drawing ShapesPygame provides a set of functions that you can use to draw shapes on the screen. Here are some examples:
Use these functions to draw a bird your new function!
ColorsIn Pygame, colors are represented by tuples of three integers (RGB) where each integer ranges from 0 to 255. For example, To define a color that you like, you can use a color picker (this one from W3Schools is good) and copy the RGB values.
Submit AssignmentWhen your program meets the requirements, submit your |
| Flappy Bird 2 | 12 Dec 2024 | 21 Dec 2024 | 12 | click to copy In part 1, you setup Pygame and defined a function to draw a bird. In this assignment you will add the logic to move the bird!
Project StructureRemember to organize your project like you did in part 1:
Submit AssignmentWhen your program meets the requirements, submit your |
| Flappy Bird 3 | 19 Dec 2024 | 8 Jan 2025 | 12 | click to copy In part 2, you added movement to your bird. In this final part, you will add the pipes!
Extra Challenge (optional)
Submit AssignmentWhen your program meets the requirements, submit your |
| Flappy Bird 4 | 9 Jan 2025 | 22 Jan 2025 | 12 | click to copy In part 3, you added scrolling pipes. In this final part, you will allow the bird to collide with the pipes!
Extra Challenge (optional)Instead of exiting the program, show an “end game” screen:
Detecting CollisionsReview the slideshow on collisions. Remember that you’ll have to check four conditions:
As an example, here’s a sketch of the first condition you’ll be checking:
And here is the code to check it (you may have to adjust the calculations):
Tracking ScoreYou can keep track of the score in a couple of different ways:
Either way, you need to make the score increase as the game continues. Rendering TextRendering text in Pygame is a three-step process:
Here’s what those steps look like:
Remember: you will need to re-draw the text every frame. See the Submit AssignmentWhen your program meets the requirements, submit your |
| Total | 189 |
Cell colors show which assignment types covered each topic.
Estimated minutes assigned each week, grouped by assignment type.