#22 Python Function Arguments

preview_player
Показать описание
#pyton #python3

A function is a block of code which only runs when it is called.

You can pass data, known as parameters, into a function.
Information can be passed into functions as arguments.

Arguments are specified after the function name, inside the parentheses. You can add as many arguments as you want, just separate them with a comma.

The following example has a function with one argument (fname). When the function is called, we pass along a first name, which is used inside the function to print the full name:

A parameter is the variable listed inside the parentheses in the function definition.

An argument is the value that is sent to the function when it is called.
Рекомендации по теме
welcome to shbcf.ru