Skip to content
BENIBIX Learn

Argument

Development🧩 Programming ConceptsFunctions

Also known as Function Argument

The value you give a function when you call it, like 3 in area(3, 4).

Think of it like

Think of it like the name you write on the blank line of a form. The line was waiting; your name fills it.

Example

Lucy calls send_email with an address and a subject. Those two values are the arguments.

Why it matters

Arguments are how you tell a function which value to work on this time. The same function gives a new answer for new arguments.

Definition

An argument is the real value you hand to a function when you call it. In area(3, 4), the arguments are 3 and 4. Each argument fills one of the function's parameters, in order. Arguments can be numbers, strings, variables or whole expressions. Some languages also let you pass them by name, like area(height=4, width=3).

Example code

python
>>> round(2.567, 1)
2.6
>>> max(3, 9, 4)
9
The values in the brackets are the arguments each function gets.

Common mistake

Passing arguments in the wrong order. area(4, 3) and area(3, 4) look alike, but swapped values can break other functions.

Key takeaways

  1. 1
    The real value. It is what the call actually sends.
  2. 2
    Fills a parameter. Each one lands in a named blank.
  3. 3
    Order matters. Unless you pass it by name.

Compare

Learn it properly