drag to orbit · scroll to zoom
← Playground

🛝 Slide · function

A function is a fixed ride. A number goes in at the top (the argument), gets changed on the way down, and a new number comes out at the bottom (the return value).

Input number x
4
x = 4 → ×2 → 8
Change x, then send the ball down the slide.
Python code
def double(x): return x * 2 result = double(4) # → 8

💡 This is what func in funcshow means: a little machine that takes an input and hands back an output.