In short
A function is a named block of code that does one job. You give it inputs, called arguments, and it can give back a result with return. It is sometimes compared to a recipe that you can use again and again.
A function is defined with def. It lets you write a piece of code once and use it many times, which avoids repeating yourself and makes mistakes easier to find. Variables created inside a function exist only inside it. If a function has no return, it gives back None.
This prints 9.0, which is joules.
Also searched as: recipe python meaning, meaning recipe python, python recipe definition, python definition recipe, python inverse function.
Python labs run in your browser. Type the code, run it and see what happens.
Open a Python lab