BIT BY BYTE
Back
Question 1 of 8
4 marks
Explain the difference between a function and a procedure. Give one example of each from Python's built-in subroutines.
Functions are written with `def`. Procedures are written with `proc`.
Functions can have parameters. Procedures cannot.
A function returns a value (e.g. `input()` returns a string). A procedure does not return a value (e.g. `print()` outputs text but returns nothing).
A function is faster. A procedure is slower but more reliable.
Check Answer