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):2print(n * 2)34result = double(4)5print(result)
The basics · 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):2print(n * 2)34result = double(4)5print(result)