Skip to content

The basics · Functions

Functions

Name a piece of work, hand it inputs, and get a value back. · 10 minutes

Predict first

What does the last line print?

1def double(n):
2 print(n * 2)
3
4result = double(4)
5print(result)