Lesson 3 of 8 · 7 min
Loops and functions
A loop repeats steps (for a count, or while a condition holds) so you don't rewrite code. A function is a named, reusable block that can take inputs (parameters) and return a result — keeping programs short and organised.
repeat 10 · def area(w,h)
Loops repeat; functions reuse
Let’s try it! ✍️
Question 1 of