Skip to content

04-06: Student Grade Calculator

Python: Fundamentals

View the live site — ijk37.com

Project 06

Home  |  All Projects  |  Notes  |  Exercises  |  Quiz Hub

Accepts subject scores for multiple students, computes averages, assigns letter grades and GPA, flags failing subjects, and prints formatted report cards plus a class-wide summary.

Topics covered: lists · tuples · dicts · for loop · if/elif · accumulation pattern · zip() · sum() · sorted() · f-string alignment · functions

Difficulty: ⭐⭐ Beginner–Intermediate


How to Run

python main.py

Sample Output

════════════════════════════════════════════════════
  REPORT CARD — RAHIM
────────────────────────────────────────────────────
  Subject               Score  Grade   GPA
────────────────────────────────────────────────────
  Mathematics            88.0     A+   4.0
  English                75.0     B+   3.3
  Science                92.0     A+   4.0
────────────────────────────────────────────────────
  AVERAGE                85.0      A   4.0  PASS ✅
════════════════════════════════════════════════════

Key Concepts Practised

Concept Where used
List of tuples (grading scale) GRADE_SCALE
zip() Pairing subjects with scores
Dictionary Student record
sorted(..., key=..., reverse=True) Class ranking
f-string alignment (:<20, :>6.1f) Report card columns
Accumulation pattern average()