Курси /
Python Functions Tutorial
Challenge: Optional Arguments
In the previous chapter, you learned how to use optional arguments. Now, let's apply your new skills in practice.
Завдання
- Set the arguments
name
andgreeting
for the function. - Set a default value for the
greeting
argument. - Run the
greet
function by passing only the positional argument during execution, and leave the optional argument as its default.
Все було зрозуміло?
Секція 2. Розділ 4
Зміст курсу
Python Functions Tutorial
1. What is Function in Python?
2. Positional and Optional Arguments
4. Function Return Value Specification
5. Recursion and Lambda Functions
Python Functions Tutorial
Challenge: Optional Arguments
In the previous chapter, you learned how to use optional arguments. Now, let's apply your new skills in practice.
Завдання
- Set the arguments
name
andgreeting
for the function. - Set a default value for the
greeting
argument. - Run the
greet
function by passing only the positional argument during execution, and leave the optional argument as its default.
Все було зрозуміло?
Секція 2. Розділ 4