Skip to content
Guest
Learn Python · Course Syllabus Show lessons
Capstone Project · 10 min read · Beginner

Capstone: Auto-Graded Python Grade Analyzer

Bring together functions, dictionaries, and comprehensions to pass an auto-graded Python capstone challenge in your browser.

What you'll learn

  • Implement a reusable analyze_scores(scores) function returning a summary dictionary
  • Pass all 4 automated Python assertions in the browser

Welcome to the Python 3 Fundamentals capstone! Complete analyze_scores(scores) below so it returns a dictionary with:

  • "count": total number of scores
  • "passed": list of scores >= 80
  • "average": average of all scores rounded to 1 decimal place (0 if scores is empty)

Auto-Graded Python Capstone Challenge

Edit the function below and click Run & Test until all 4 automated assertions turn green!

PythonPython Capstone: Grade Analyzer
Python Output (WebAssembly / Pyodide)

Click Run Python to execute real Python 3 right in your browser.

Automated Python Tests
  • Returns count == 4 for [75, 82, 94, 88]
  • Filters passed scores >= 80 into [82, 94, 88]
  • Calculates average == 84.8 rounded to 1 decimal
  • Handles an empty list [] safely with average == 0

Python Fundamentals Final Check

Score: 0 / 1

1. Why should you check `if scores` before computing `sum(scores) / len(scores)`?

Study Workspace

Finished this lesson?

Your progress is saved locally in your browser, no account needed.

Search courses, lessons, and references

Type to search across all courses, lessons, and quick references.

Press Esc to close Powered by Pagefind