Glossary · Phase 0 · Tools
Argument
A value you hand to a function when you call it, like the number in round(3.7).
Defining a function doesn't run it. It runs when you call it: the name, followed by parentheses holding the values to use. Those values are the arguments. In
click_through_rate(5470, 182340), 5470 goes intoclicksand 182340 intoimpressions, matched by position.
Try it now
Python skips the body on line 1 until line 5 calls the function. Each call gets its own frame with its own spend, clicks and cpc, which disappears when the function returns.
Learn it properly
Functions · Package steps into reusable, testable pieces with inputs and outputs. About 25 minutes.
Other terms from the same lesson
- function: A named, reusable piece of code that takes inputs and gives back a result.
- return value: What a function hands back when it finishes.
Never trained an AI?
Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account.