Skip to content

Final Project

For twelve weeks, the faculty decided what your programs should do. For the last three weeks of the course, you decide. You will propose a program in a domain you care about, turn the idea into requirements you can build, and then build it, test it, and present it.

Projects are individual. You may talk with classmates about ideas, but the program you submit must be your own work, and you must be able to explain and defend every part of it.

Timeline

Week Dates What happens
13 11/16–11/20 Choose a topic and a data file. Write your README and stubs. TA Check-in 1.
11/23–11/27 Thanksgiving break (no TA hours)
14 11/30–12/04 Get your minimum version working. Short demos of optional libraries.
15 12/07–12/11 Finish, submit, and present. Last TA check-ins on Tue 12/8.

Plan on about 15 hours of work in total. After the README, tests, and presentation, that leaves about 10 hours of coding, so choose an idea you can build in that time.

First milestone

By the end of Week 13, your repository should have:

  • a folder, project/, in which you'll put all of your project work.
  • a README.md that says what your program will do, which data it uses, its minimum version, and its stretch goals;
  • stubs for your modules: every function you plan to write, with type hints, a docstring, and pass as its body;
  • stubs for your tests: a test file with a test function for each logic function you plan to test.

The Week 13 study guide shows how to cut an idea down and stub it out.

TA check-ins

You'll meet with a TA twice, on two different days: Check-in 1 reviews your plan (your README and stubs), and Check-in 2 reviews your code and rehearses your presentation. See TA Check-Ins for when to go, how to book, and how to prepare.

Presentation

You'll present your project to the class: a 2-minute demo of your program running, then a 2-minute explanation of one interesting part of your code. A good explanation walks through a concrete example and focuses on one idea; reading your code line by line isn't an explanation.

What we expect

A project the right size has:

  • A logic module of about 8–12 functions that never call input() or print(). Some of them will be short helpers, and that's fine.
  • A small main module with the menu or game loop that talks to the user, and calls the logic functions to do the work.
  • One data file (CSV, JSON, or text) that the program reads, and usually writes back.
  • A test file with tests for your logic functions.
  • About 150–300 lines of code, not counting tests.

Every plan has a minimum version, usually three or four features, that has to work by the end of Week 14, and stretch goals for any time you have left over. Most ideas start out too big, and that's fine: if yours is, the stretch list gets longer, but your project still works.

Separate the logic from the input and output

Logic functions take data in through their parameters and return results. Only the main module calls input() and print().

This one rule is what makes your program testable: a test can call a logic function with a small piece of data and check its answer with assert. It also gives you natural places to set breakpoints when you need the debugger.

Testing

You need at least one passing test to meet the Basic claims, but aim higher: testing every function in your logic module, and testing edge cases, each earn an Intermediate claim. Good tests use small data typed into the test rather than your whole data file, and check edge cases (an empty list, one item, a missing key, a tie, a zero) as well as ordinary inputs.

You don't need 100% coverage, but run pytest with coverage anyway: the lines it marks as never run are the ones your tests haven't checked yet.

Grading

The project is worth 100 points:

Part Points
Product: the claims your program earns 50
Process: TA check-ins and their reflections 30
Your content presentation (earlier in the semester) 10
Your project presentation (Week 15) 10

A claim is something your project has or does, such as "Uses a while loop that does real work." You earn claims by showing them to your instructor, and the more you earn, the higher your product grade. Read the Basic claims before you start. You need all of them to score 35 or higher, and they include passing ruff check, a README that lists your claims, and commits spread over the three weeks.

Example topics

Start from something you already care about: a hobby, a class you're taking, a job, a game, a place. These examples are the right size:

  1. Music listening stats. Read your exported listening history (Spotify lets anyone download theirs as JSON) or a hand-made CSV. Report your top artists, total listening time by month, and genres. Stretch: compare two people's tastes and find the artists they have in common, using set intersection.
  2. Personal budget tracker. Add expenses to a CSV file, and summarize them by category and by month, with a warning when a category goes over its budget. Stretch: track progress toward a savings goal, or draw a chart.
  3. Climate or weather explorer. Use a NOAA or city weather dataset to find each year's hottest days, monthly averages, and record streaks. Stretch: compare two cities, or get current conditions from a weather API.
  4. Recipe box / meal planner. Recipes are stored as nested JSON. Scale the servings, build one shopping list from several recipes by combining their ingredients, and flag dietary restrictions. Stretch: search by the ingredients you have on hand.
  5. Language vocabulary trainer. A file holds word pairs for a language you're learning. The program quizzes you and keeps track of how often you miss each word in a JSON file, so harder words come up more often. Stretch: practice in both directions, or accept answers without accents. (It should go well beyond PA3's Trivia Night.)
  6. Text analyzer for literature or speeches. Take a public-domain book or a set of speeches and report word frequencies, the longest sentences, vocabulary richness, and how often each character is mentioned. Stretch: compare two authors or two eras.
  7. Volunteer or club scheduler. Read people and their availability from a file. Assign shifts, flag gaps and double-bookings, and print a schedule for each person. Stretch: balance hours fairly, or write a schedule file for each person.
  8. Fitness or health log. Log workouts, sleep, or water intake, and report weekly totals, streaks, and personal records. Stretch: set goals and get feedback on your progress, or draw a chart.
  9. Course schedule checker. Read courses with meeting times and prerequisites from a file, and check a planned semester for time conflicts and missing prerequisites. Stretch: list the courses you can take next.
  10. Word or card game. Spelling Bee with a word-list file, or Yahtzee or Blackjack scoring. Scoring functions are great to test, and seeding random keeps your tests predictable. Stretch: a hint mode, a simple computer opponent, or a high-score file.

Where to find data: data.gov, Kaggle, Project Gutenberg, the CORGIS datasets, data you export from an app you use, or a file you write by hand.

Too small

A calculator, a single-round guessing game, or Hangman with the words typed into the code are all too small. None of them needs a data file, nested data, or more than one module.

Going further (optional)

If you already have some programming background, you might want to build something bigger: a website, a game with graphics, a data analysis with Pandas, or a program that pulls data from the web. You're welcome to, but it isn't expected, and it earns nothing extra beyond the Stretch claims it makes. A focused text-based program can earn full credit. If you take this route:

  • Talk to your instructor during Week 13. Your minimum version should still be achievable if the new library takes longer to learn than you planned, which it often does.
  • Write your own logic as plain functions. A framework might require a class, such as a subclass of arcade's Window. Keep that code thin, and have it call your own tested functions that take data in and return results.
  • Keep the course skills visible. A library should sit on top of your code, not replace it. A project that uses Pandas must still do real work with its own dictionaries and loops, not just DataFrame calls.
  • Be able to explain every part, including the framework code. "The tutorial said to write it that way" isn't an explanation.

In Week 14 we'll give a few short demos of these libraries, chosen from what the most projects need:

Topic Libraries Connects back to
Getting live data from the web requests Week 12: an API response is nested data
Pulling data out of web pages BeautifulSoup Week 10 string processing; respect each site's robots.txt and terms
Data analysis Pandas Weeks 11–12: a DataFrame is like a dictionary of lists
Charts matplotlib Any project with numbers to show
Making a program a website Flask, FastAPI Functions: each page is a function that returns a string or dictionary
Graphical interfaces PySide6, turtle Functions: each button calls a function you wrote
Games with graphics arcade, Pygame Week 9: the game loop is a while loop
Images Pillow Nested loops over rows and columns of pixels

Code that uses the network, draws on the screen, or runs inside a framework is hard to test. Keep that code short, and test your own functions on saved sample data or small dictionaries typed into your tests.