Lowest, Highest and Average
Python
25 pts
Lowest, Highest and Average
Define mark_summary(marks) that takes a list of marks and returns three values: the lowest mark, the highest mark, and the average rounded to 1 decimal place.
Then unpack the result into low, high and avg for the marks [70, 85, 90] and print them on one line.
Expected output:
70 90 81.7
Checklist
- Define a function called
mark_summarywith one parameter,marks. - Return three values: the lowest mark, the highest mark and the average rounded to 1 decimal place.
- Unpack the result for
[70, 85, 90]intolow,highandavg, and print them on one line.
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
