What does parameter mean?
A name inside a function definition for a value the caller will pass in. The actual value passed when the function is called is the argument.
In a lesson
sizeis a parameter: a variable in the function's definition that gets its value from the call. The value in the call,15or30, is the argument. Forsquare(15),sizeis 15 inside the body; forsquare(30)it is 30. One function, any size of square.
Learn it
- Taught in F4.2 Parameters and return values Functions and structured code, GCSE
Used in
- F1.3 Calling functions
- F1.9 Arithmetic operators
- F4.3 Local and global variables
- F4.5 Libraries and your own modules
- F4.6 Project: the patrol
- F12.8 Technology, jobs and daily life
- F13.6 Long answer questions
- 0.2 Numbers and names
- 0.5 Your own commands
- 1.5 Speed and precision
and 49 more lessons.
Do the lesson in the simulator