Advanced functions and decorators · 7 / 15 Exercise Easy

Grades summary

Objective

Create a Python program with a function that receives a variable number of grades and returns several results at once.

Instructions

  • Define def summary(*grades), which returns the lowest grade, the highest and the average (in this order, as a tuple).
  • Read a line with integer grades separated by spaces (at least one) and call summary(*grades).
  • Show Minimum: X, Maximum: Y and Average: Z on three lines, with the average to 2 decimals.
Input
7 5 9 6
Output
Minimum: 5
Maximum: 9
Average: 6.75

Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.

Start exercise