Capstone 3 · Level III

The Classroom Gradebook

A teacher running a Sankofa Code cohort needs a gradebook. Students have scores across assignments, quizzes, and projects, weighted differently. Some students missed work entirely, and a missing score is not a zero, it is missing. Build a system that computes weighted averages, assigns letter grades, identifies students who need support, and produces both a per-student report and a class summary. The hard part is not the arithmetic, it is deciding honestly how to treat absent data.

Concepts used

FunctionsScopeConditionalsWeighted averagesNone and nullSortingError handling

Your dataset

At least eight students, three assessment categories, and at least three genuinely missing scores.

Milestones

1Model a student with separate score lists per category, allowing missing entries.
2Compute a category average that ignores missing scores rather than counting them as zero.
3Apply category weights (assignments 40, quizzes 25, projects 35) to get a final percentage.
4Convert a percentage to a letter grade with an ordered conditional chain.
5Flag students below a threshold, and students with more than one missing score.
6Produce a class summary: average, highest, lowest, and the grade distribution.

The graded core

The rest of this project is yours to shape. This one function is the piece everything else depends on, so it runs against hidden tests to prove it is right before you build outward.

◈ Graded Challenge

The judgement call at the centre of the gradebook. Write a function that averages a list of scores while IGNORING missing entries (None in Python, null in JavaScript). A missing score must not be treated as a zero. Return the average rounded to one decimal place, or 0 if there are no valid scores at all.

Name it exactly: def average_scores(scores):

3 visible + 3 hidden
loading editor…

Your workspace

Build the full project here. Work through the milestones in order, in both languages.

SANKOFA SANDBOX
loading editor…
Your turn → Build it in Python first, then rebuild it in JavaScript. The logic transfers, only the syntax changes.
← All projectsNext: The Data Detective