Exam-style question
Try this first
What is the main purpose of a parameter in a subroutine?.
- A.To pass data into the subroutine
- B.To permanently store every value used by the program
- C.To stop the subroutine from being called
- D.To display the subroutine's results automatically
Model answer
What a good answer should say
- A parameter provides a way for data to be passed to a subroutine when it is called.
Explanation
Why this works
Parameters allow a subroutine to receive data from the part of the program that calls it. This makes the subroutine usable with different data values.
Common mistake
No common mistake is linked to this question yet.
