Chapter 11 - Zero to Python Hero
⚠️ Preview chapter about functions of the Zero to Python Hero E-Book. ⚠️
Sub-sections
Introduction to functions
What functions are and why you should use them.
Creating and calling a function
How to create and call a function, with visuals and examples.
Return statement
How to return a value from a function.
Parameters and arguments
Difference between parameters and arguments, keyword arguments, default parameters, *args and **kwargs.
Variable scope and lifetime
What the scope is, what the lifetime is, local variables and global variables.
Docstring
How to document your functions and why it's important.
Recursion
How to write recursive functions, base case and general case, visuals, examples and code walkthroughs.
Practice page
Quizzes, questions and programs to write in order to test the knowledge you've gained in this chapter.
🚀 Read this chapter in case you're serious about learning Python. If you like the teaching style, feel free to consider getting the full Zero to Python Hero E-Book, where this same structure and teaching style has been followed throughout all the 15 chapters!