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

Course Content

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

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

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 2. Chapter 4
toggle bottom row

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

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 2. Chapter 4
toggle bottom row

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

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

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.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Section 2. Chapter 4
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
some-alt