Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge: Average Mark | Arguments in Function
Intermediate Python: Arguments, Scopes and Decorators

Challenge: Average MarkChallenge: Average Mark

Tarea

Let's calculate the average mark for the student. Each student has a different number of marks, so we don't know how many arguments will be passed to the function.

  1. Set the first positional argument as name in the average_mark function;
  2. For other arguments use *args;
  3. In the equation that counts the mark variable use args without *;
  4. In the print statement use name and mark variables.

¿Todo estuvo claro?

Sección 2. Capítulo 3
toggle bottom row
course content

Contenido del Curso

Intermediate Python: Arguments, Scopes and Decorators

Challenge: Average MarkChallenge: Average Mark

Tarea

Let's calculate the average mark for the student. Each student has a different number of marks, so we don't know how many arguments will be passed to the function.

  1. Set the first positional argument as name in the average_mark function;
  2. For other arguments use *args;
  3. In the equation that counts the mark variable use args without *;
  4. In the print statement use name and mark variables.

¿Todo estuvo claro?

Sección 2. Capítulo 3
toggle bottom row
some-alt