Exercise 10: A Small Formatted Table — Possible Solution ==================================================================== students = [("Priya", 88.5), ("Tom", 72.0), ("Aisha", 95.25)] total = 0 for name, score in students: print(f"{name:<10}{score:>8.1f}") total += score average = total / len(students) print(f"{'Average':<10}{average:>8.1f}") Output: Priya 88.5 Tom 72.0 Aisha 95.2 Average 85.2 WHY THIS WORKS AS AN ANSWER ------------------------------ {name:<10} left-aligns each student's name inside a 10-character field, and {score:>8.1f} right-aligns each score inside an 8-character field with exactly one decimal place — the same two-specifier pattern as this lesson's receipt case study, just applied to a different pair of columns. Aisha's 95.25 and the average of 85.25 both land exactly on a rounding tie (halfway between two displayed values), and Python's :.1f rounds ties to the nearest EVEN final digit rather than always rounding up — so 95.25 becomes 95.2 (2 is even) and 85.25 becomes 85.2 (also even), not 95.3/85.3 as "round half up" would suggest. This is the same "banker's rounding" behaviour Python's own round() function uses, and it only becomes visible when a value is exactly on a .x5 boundary, unlike Exercise 5's 23.745, which wasn't a clean tie. The running total is accumulated in the loop exactly like a normal sum, then divided by len(students) once the loop ends to get the average — the average line reuses the same field widths so it lines up under the columns above it.