Question:
Which of the following statements about functions is correct?
A function is a block of syntax that iterates over a variable until a condition is met.
A function is a block of syntax that is used to define a distinct type and can be instantiated into instances of itself.
A function is a block of syntax that is a sequence of program instructions that performs a specific task, packaged as a unit.
A function is a block of syntax that comprises a logical statement involving a comparison, which yields a Boolean (True or False) value.
Exercise:
Write a function that takes an x-y coordinate, the radius and centroid of a circle and determines if the point lies inside the circle.