Skip to content

Project Claims

Your product grade (50 of the project's 100 points) is based on claims. A claim is something your project has or does, such as "Uses a while loop that does real work." Claims come in three levels:

  • Basic claims are what a program needs to be considered "done." You need all of them to score 35 or higher.
  • Intermediate claims are skills from the course that your project may or may not need. A good project shows many of them.
  • Stretch claims go beyond the course, into topics you may have to research and learn on your own.

Scoring

  • Your project must run without error to receive a D (30/50) or higher.
  • To reach the C range (35/50), you must meet all the Basic claims.
  • To reach the B range (40/50), you must also make 8 Intermediate claims.
  • To reach the A range (45/50), you must also make at least one Stretch claim.

Beyond your level, each Intermediate claim past 8 adds 1 point, and each Stretch claim past the first adds 2 points, up to a maximum of 50.

Making claims

Make a claim by showing it to your instructor, during work time in class or in office hours. You can make at most five non-Basic claims per day, so build up your score gradually as you work, rather than leaving everything to the end.

The most important claims

Claim B1 says your README must list what your program does, and B2 says it must actually do it. In other words, your program must work.

The Claims

Basic

  • B1. The README.md states what the program does, the data it uses, how to run it, and what claims it satisfies.
  • B2. Every feature the README lists works.
  • B3. The whole project passes ruff check with no violations, including docstrings on every module and function.
  • B4. The program is organized into functions that take parameters and return results.
  • B5. Uses an if statement.
  • B6. Uses a while loop that does real work (a menu, a game loop, or input validation).
  • B7. Reads data from a file and writes data to a file.
  • B8. Produces output for the user, formatted for reading rather than as raw Python values (no stray brackets, quotes, or None).
  • B9. Uses a dictionary or a set for a good reason (looking up, counting, grouping, or tracking what has been seen).
  • B10. Has at least one pytest test that passes.
  • B11. The project lives in a git repository with commits spread over the project, not all made at the end.
  • B12. Uses nested data, such as a list of dictionaries or a dictionary of lists (Week 12).

Intermediate

Expressions and types

  • I13. Converts input to the type it needs with int() or float().
  • I14. Uses // and % for a real purpose (e.g., minutes into hours and minutes), or **.
  • I15. Uses f-strings with format specifiers (:.2f, :>10, :,) to line up columns or round money.
  • I16. Imports and uses a standard-library module (math, random, datetime, os, …).

Branches

  • I17. Uses an if / elif / else chain where the order of the conditions matters.
  • I18. Combines conditions with and, or, or not.
  • I19. Relies on short-circuit evaluation to avoid an error (e.g., if key in data and data[key] > 0).
  • I20. Uses truthiness on purpose (if results: to check for an empty list).
  • I21. Handles bad user input or a missing file without crashing.

Functions and modules

  • I22. The program is split into two or more modules that import from each other.
  • I23. Builds a bigger job out of smaller functions, with one function calling another.
  • I24. Returns several values as a tuple and unpacks them at the call site.
  • I25. Uses a tuple for a small fixed group of values (a coordinate, a date, a min/max pair).
  • I26. Passes data between functions through parameters and return values, with no global variables.
  • I27. Uses if __name__ == "__main__": so a module can be imported without running.
  • I28. Functions have type hints on parameters and return values.

Loops

  • I29. Uses a for loop to accumulate a total, count, or average.
  • I30. Uses a for loop to filter a list into a new list.
  • I31. Uses range() with two or three arguments for a real purpose.
  • I32. Uses a nested loop for a real purpose.
  • I33. Loops over the characters of a string to count, search, or build a new string.
  • I34. Uses random for a real purpose (shuffling, picking a question, simulating dice).

Lists, sets, and strings

  • I35. Changes a list in place with append(), index assignment, remove() / pop(), or sort().
  • I36. Has a function that changes a list passed in to it, so the caller sees the change.
  • I37. Slices a string or list ([start:stop], [:n], [::-1]).
  • I38. Cleans text with strip(), split(), lower() / upper(), replace(), or join().

Dictionaries

  • I39. Checks whether a key is present before using it (in, or .get() with a default).
  • I40. Iterates over .items(), .keys(), or .values() to summarize or group data.
  • I41. Groups data into a dictionary of lists (e.g., each category maps to its expenses).
  • I42. Uses a list comprehension.
  • I43. Uses a set or dictionary comprehension.

Files and nested data

  • I44. Loads data from a JSON file with json.load().
  • I45. Loads data from a CSV file with csv.reader or csv.DictReader.
  • I46. Picks out the records that match a condition from nested data and pulls one field from each.
  • I47. Combines information from two different files.
  • I48. Writes nested data back out with json.dump().
  • I49. Writes data out to a CSV file with csv.writer or csv.DictWriter.

Testing

  • I50. Every logic function has at least one test.
  • I51. Tests check edge cases (empty list, one item, missing key, ties, zero) as well as ordinary inputs.
  • I52. Tests use small data typed into the test rather than the full data file.
  • I53. Running pytest with coverage shows every line of the logic modules as run by the tests.

Miscellaneous

  • I54. Uses sorted() or .sort() with key=.
  • I55. Uses enumerate() or zip().
  • I56. Uses break or continue.
  • I57. Defines a function with default or keyword arguments.
  • I58. Uses try / except to recover from a specific error (ValueError, FileNotFoundError, KeyError).

Stretch

Each of these should still sit in plain, tested functions that you can explain. A claim that uses a third-party package includes installing it with pip into your project's virtual environment and listing it in requirements.txt.

  • S59. Fetches JSON from a web API with requests or urllib, and saves a response to a file so the tests do not need the internet.
  • S60. Has a graphical or web interface (turtle, pyside6, pygame, arcade, Flask, FastAPI).
  • S61. Draws a chart of the data with matplotlib.
  • S62. Navigates at least two levels of nesting (e.g., recipes[i]["ingredients"][j]["amount"]).
  • S63. Scrapes data from a web page with BeautifulSoup, and saves a copy of the page to a file so the tests do not need the internet.
  • S64. Analyzes data with Pandas, and computes at least one of the same results with your own dictionaries and loops, with a test that the two agree.
  • S65. Has a computer opponent or solver that follows a strategy rather than moving at random (a greedy choice, a search over possible moves, or a breadth-first search on a grid).
  • S66. Reads, changes, and saves an image with Pillow (e.g., grayscale, crop, resize, or a filter).
  • S67. Some other feature approved as a stretch claim by the instructor.