Unit 3 Task 4: Marks in a list

Learn to code with step-by-step lessons. A place for students to work through programming fundamentals and build skills.

Unit 3 Task 4 - Marks in a list

← Unit 3 tasks - Solution


Collect marks (floats) in a list. Keep asking until the user enters -1 (do not store -1).

Print how many marks were stored and their average. If no marks were entered before -1, print a short message instead of dividing by zero.

Skills: append, sentinel loop, sum, len.