6: Fruitful functions
( \newcommand{\kernel}{\mathrm{null}\,}\)
Many of the Python functions we have used, such as the math functions, produce return values. But the functions we’ve written are all void: they have an effect, like printing a value or moving a turtle, but they don’t have a return value. In this chapter you will learn to write fruitful functions.