Programming (Year 12)

Define a function and its purpose in programming.

A function is a block of code designed to perform a specific task and can be reused throughout the program.