Chapter 8. Functions
Define functions
1. Functions in python are defined using the block keyword "def", followed with the function's name as the block's name.
2. Functions may also receive arguments (variables passed from the caller to the function).
3. Functions may return a value to the caller, using the keyword- 'return' .
Call functions
Simply write the function's name followed by (), placing any required arguments within the brackets.
Exercise
learnpython.org
'IT World > Python' 카테고리의 다른 글
Python Training Day 7. Dictionaries (0) | 2022.12.18 |
---|---|
Python Training Day 6. Classes and Objects (0) | 2022.12.17 |
Python Training Day4. Loops (0) | 2022.12.15 |
Python Training Day3. Conditions (0) | 2022.12.14 |
Python Training Day1, Day2. String Formatting, Basic String Operations (0) | 2022.12.13 |
댓글