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

Course Content

Python Functions Tutorial

Challenge: Optional ArgumentsChallenge: Optional Arguments

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

Task

  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.

Everything was clear?

Section 2. Chapter 4
toggle bottom row
course content

Course Content

Python Functions Tutorial

Challenge: Optional ArgumentsChallenge: Optional Arguments

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

Task

  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.

Everything was clear?

Section 2. Chapter 4
toggle bottom row
some-alt