Challenge: Calculating the Average Mark with *args
Tarefa
Swipe to start coding
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.
- Set the first positional argument as
namein theaverage_markfunction; - For other arguments use
*args; - In the equation that counts the
markvariable useargswithout*; - In the
printstatement usenameandmarkvariables.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 2. Capítulo 3
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Suggested prompts:
Resumir este capítulo
Explicar o código em file
Explicar por que file não resolve a tarefa
Awesome!
Completion rate improved to 3.7
Challenge: Calculating the Average Mark with *args
Deslize para mostrar o menu
Tarefa
Swipe to start coding
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.
- Set the first positional argument as
namein theaverage_markfunction; - For other arguments use
*args; - In the equation that counts the
markvariable useargswithout*; - In the
printstatement usenameandmarkvariables.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 2. Capítulo 3
single