Lesson 34 of 34

Mini Project: Report Card

15 min 50 XP

Congratulations! You've learned all of Python's basics. Now let's combine input, lists, loops, conditions and functions in a report card program.

Example: edit me and press Run

Output Loading Python (first time takes a few seconds)
Press Run to see the result here.

In an f-string, {avg:.2f} means 2 decimal places, {s:<8} pads to 8 on the left and {m:>3} right-aligns in 3. Great for neat tables.

What next? Solve problems in the Practice section, take Mock Interview tests and climb the leaderboard. For live training, join Skill Park Academy!

Challenge

+50 XP

One line of space-separated marks is given. Print the total, the average (2 decimals) and the grade on one line in exactly this format: Total: 255, Average: 85.00, Grade: B Grade: average 90+ → A, 75+ → B, 50+ → C, otherwise Fail

Output Loading Python (first time takes a few seconds)
Press Run to see the result here.