Parameters and arguments
Parameters are formal variables declared in function definitions, while arguments are actual values passed to functions during calls. Parameters enable functions to operate on different data without code duplication. Arguments provide the input data for function execution. Understanding parameter passing is essential for correct function behavior.
Real World
When you call print() in Python with the argument end="" instead of the default newline, you are overriding a default parameter — the same technique Instagram's backend uses to configure API response formats.
Exam Focus
In trace-table questions, track whether parameters are passed by value or by reference to determine if the original variable changes.
How well did you know this?