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

Conteúdo do 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

Tarefa

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.

Tarefa

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.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

Seção 2. Capítulo 3
toggle bottom row

Challenge: Average Mark

Tarefa

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.

Tarefa

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.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

Seção 2. Capítulo 3
toggle bottom row

Challenge: Average Mark

Tarefa

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.

Tarefa

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.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

Tarefa

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.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Seção 2. Capítulo 3
Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
We're sorry to hear that something went wrong. What happened?
some-alt