Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge: Optional Arguments | Positional and Optional Arguments
Python Functions Tutorial
course content

Conteúdo do Curso

Python Functions Tutorial

Python Functions Tutorial

1. What is Function in Python?
2. Positional and Optional Arguments
3. Arbitrary Arguments
4. Function Return Value Specification
5. Recursion and Lambda Functions

Challenge: Optional Arguments

In the previous chapter, you learned how to use optional arguments. Now, let's apply your new skills in practice.

Tarefa

  1. Set the arguments name and greeting for the function.
  2. Set a default value for the greeting argument.
  3. Run the greet function by passing only the positional argument during execution, and leave the optional argument as its default.

Tarefa

  1. Set the arguments name and greeting for the function.
  2. Set a default value for the greeting argument.
  3. Run the greet function by passing only the positional argument during execution, and leave the optional argument as its default.

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 4
toggle bottom row

Challenge: Optional Arguments

In the previous chapter, you learned how to use optional arguments. Now, let's apply your new skills in practice.

Tarefa

  1. Set the arguments name and greeting for the function.
  2. Set a default value for the greeting argument.
  3. Run the greet function by passing only the positional argument during execution, and leave the optional argument as its default.

Tarefa

  1. Set the arguments name and greeting for the function.
  2. Set a default value for the greeting argument.
  3. Run the greet function by passing only the positional argument during execution, and leave the optional argument as its default.

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 4
toggle bottom row

Challenge: Optional Arguments

In the previous chapter, you learned how to use optional arguments. Now, let's apply your new skills in practice.

Tarefa

  1. Set the arguments name and greeting for the function.
  2. Set a default value for the greeting argument.
  3. Run the greet function by passing only the positional argument during execution, and leave the optional argument as its default.

Tarefa

  1. Set the arguments name and greeting for the function.
  2. Set a default value for the greeting argument.
  3. Run the greet function by passing only the positional argument during execution, and leave the optional argument as its default.

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

Tudo estava claro?

In the previous chapter, you learned how to use optional arguments. Now, let's apply your new skills in practice.

Tarefa

  1. Set the arguments name and greeting for the function.
  2. Set a default value for the greeting argument.
  3. Run the greet function by passing only the positional argument during execution, and leave the optional argument as its default.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Seção 2. Capítulo 4
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