Concept
A function takes inputs through its parameters and hands a result back with return. Code that returns a value is easier to test and reuse than code that only prints.
The tutor works through these with you, in conversation and code. A session ends when you have shown them, not when a video does.
A few lines that show Parameters and return values doing its job.
def area(width, height):
return width * height
kitchen = area(4, 3)
print(kitchen) # 12
def greet(name):
print("Hello", name)
result = greet("Ada") # prints, but result is NonePrinting inside a function instead of returning. The caller gets None back, so the value cannot be stored, compared or passed on.
Your roadmap puts these before Parameters and return values, unless you already know them.
Once a session shows you understand Parameters and return values, it comes back for review. Each review takes a minute and tells the memory model how well you still know it.
Topics that build on Parameters and return values.