Exam-style question
Try this first
Understanding the use of functions and procedures in programming.
Description
Functions and Procedures
In a programming language, a function named 'calculateArea' takes two parameters: 'length' and 'width'. It returns the area calculated as length multiplied by width. A procedure named 'displayMessage' takes one parameter 'message' and prints it to the console.
- a[1]
State the difference between a function and a procedure.
Aim for approximately 1 distinct marking point.
0 of 1 part answered
Answer every part before opening the mark scheme.
Concise answer preview
Concise answer
A function returns a value, while a procedure does not.
Why this is correct
This distinction is fundamental in programming as it defines how each is used.
Complete every part above to unlock the full mark scheme through the existing protected review flow.
Common mistake
No common mistake is linked to this question yet.
