What is a function — CCA-F Exam Prep

PencilPrepPencilPrep
L0.22|What is a function
1/12
Compare these
Split screen. Left: a toaster with bread going in and toast coming out. Right: a chef in a kitchen surrounded by dozens of tools, ingredients, and half-finished dishes. Clean illustration.

A toaster vs a chef. Both make toast.

The toaster does ONE thing: bread in, toast out. Every time. No variation. No creativity. No asking "would you prefer sourdough?" Bread in. Toast out.

The chef is a whole program. She makes toast, eggs, pancakes, omelets. She improvises. She adjusts. She runs an entire kitchen.

The toaster is a function. The chef is the program that calls the toaster.