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. ...
All of the functions we have written so far are void; they print something or move turtles around, but their return value is None. In this chapter, we are (finally) going to write fruitful functions. The first example is area, which returns the area of a circle with the given radius:...