© Irv Kalb 2018
Irv KalbLearn to Program with Python 3https://doi.org/10.1007/978-1-4842-3879-0_4

4. User-Defined Functions

Irv Kalb1 
(1)
Mountain View, California, USA
 

Software is a detailed set of instructions that tell the computer what to do. There are numerous examples where we, as humans, follow a set of such instructions. As a simple example, many pieces of furniture from IKEA come with a set of high-level instructions in the form of pictures. When creating these instructions, the people at IKEA assume a certain level of basic knowledge of how to use tools, such as a wrench, a screwdriver, a hammer, and so on.

But using tools could be broken down into simpler steps. Using a hammer could be broken down into grip the hammer by the handle, hold ...

Get Learn to Program with Python 3: A Step-by-Step Guide to Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.