positional argument
An argument matched to a parameter by its position in the call: first to first, second to second.
In more detail
In quotient(7, 2), 7 goes to the first parameter and 2 to the second, so swapping them changes the result. Positional arguments must come before keyword arguments.
Related terms
- keyword argument — An argument passed by naming the parameter it is for, as in print(x, end=""), instead of by position.
- argument — A value you pass to a function when you call it, written inside the parentheses of the call.
- parameter — A name in a function definition that receives the value of an argument each time the function is called.
Taught in
- Methods, Attributes And self — Hands-on Python: Complete Video Course & Book
- Parameters, Arguments And Scope — PCEP Certified Entry-Level Python Programmer (PCEP-30-02) Exam Prep
- Methods And The self Parameter — PCAP Certified Associate in Python Programming (PCAP-31-03) Exam Prep
- Inheritance, super() And Polymorphism — PCAP Certified Associate in Python Programming (PCAP-31-03) Exam Prep