That’s what a function is in Python. It’s a reusable piece of code that does something specific. You give it some data (we call these ‘parameters’), and it gives you back a result (the ‘return value’).
As discussed in An Introduction to Learning Python Programming, a variable is like a container that stores data values. Think of it as a label you put on a box where you can store something (like a number or text).