Skip to main content
Loading page…
Python Mastery
Chapter 6
Lesson 1 of 4
Defining & Calling Functions
Contents
Notes
Tutor
Concept
Why Functions Matter
Loading activity…
Previous
1 / 7
Continue
Contents
Notes
Discussion
Tutor
22 min
7 activities
0 of 7 done
In this lesson
1
Why Functions Matter
2
Return Values & the Implicit None
3
Worked Example: Refactoring Repeated Logic
4
Quick Check: Parameters vs Arguments
5
Pitfall: Using the Return Value of a void-style Function
6
Practice: Write a Temperature Converter
7
Pro Tip: Name Functions After What They Return, Not How They Work
Objectives
Learner can define a function using def, parameters, and a return statement
Learner can explain the difference between parameters and arguments
Learner can write a docstring that follows PEP 257 conventions
Learner can apply the DRY and single-responsibility principles when extracting functions
Chapter 6 · Functions
Defining & Calling Functions
Arguments In Depth
Scope: The LEGB Rule
Recursion & Lambdas
Previous: Structural Pattern Matching (match/case)
Next: Arguments In Depth