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
course content

Contenido del Curso

Intermediate Python: Arguments, Scopes and Decorators

Intermediate Python: Arguments, Scopes and Decorators

1. Packing and Unpacking
2. Arguments in Function
3. Function as an Argument
4. Variable Scope
5. Decorators

Challenge: 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.

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.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones

¿Todo estuvo claro?

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

Challenge: 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.

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.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones

¿Todo estuvo claro?

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

Challenge: 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.

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.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones

¿Todo estuvo claro?

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.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
Sección 2. Capítulo 3
Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
We're sorry to hear that something went wrong. What happened?
some-alt