01 / 05
You keep writing the same steps
As you write programs, you keep running into places where you want exactly the same few lines again.
Copy and paste works for now. But when you want to change it, you have to change every place you pasted it. Miss one and that one stays on the old behaviour.
That is what a function is for. It is the machinery for giving a lump of work a name and calling it up by that name.