🐍 Python for Everyone

← Back to interview questions

Chapter 4 Project 20 min build

Grade Calculator

A report-card generator built entirely from if/elif/else — the exact kind of grading logic used by real school and university systems.

Grading scale

AverageGrade
75 and aboveA
60 - 74B
50 - 59C
40 - 49D
below 40Fail

Example run

Output
Enter marks in Math: 80
Enter marks in Science: 70
Enter marks in English: 65
Enter marks in History: 90
Enter marks in Computer Science: 85

=== Report Card ===
Average: 78.0
Grade: A
How to run Download starter.py below and run python3 starter.py.

Ideas to make it your own

Why this project matters

Grading logic like this appears constantly in real systems: eligibility checks, pricing tiers, risk scoring, access levels. The elif-chain ordering skill you practiced here is genuinely transferable.

← Interview Questions All Chapters →