curve(scores) scaling a class's exam scores so the top score becomes 100 and everyone rises proportionally (score × 100 / top), rounded to 1 decimal. An empty list returns empty; a top score of 0 returns the list unchanged.curve([40, 60, 80])
[50.0, 75.0, 100.0]
Everything scales by 100/80.
factor = 100 / max(scores).
Comprehension with round(s * factor, 1).