As it's time for my morning coffee (the coffee not the biscuits), it's as good a time as any to share my one of my favourite analogies

_(narrated from a -viewpoint but general enough for in general)_

**The Coffee Machine - Function analogy**

Let's make some coffee…

_[read on]_

/1

A function is like a coffee machine

– 1 –

It needs inputs to work (arguments):
— water
— electricity
— ground coffee beans (or pods if so inclined)

You can choose to put different blends of coffee into your machine (choice of what argument to pass to function)

2/

— 2 —
You press the "On" button—this is equivalent to calling the function.

You can almost see the similarity between the typical "On" button and the parentheses ( ) used to call a function in Python!

3/

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.