G
grocery_stocker
Taken from the url....
http://openbookproject.net/thinkCSpy/ch05.xhtml#index15
"The built-in functions we have used, such as abs,
pow, and max, have produced results. Calling each of
these functions generates a value, which we usually assign to a
variable or
use as part of an expression.
biggest = max(3, 7, 2, 5)
x = abs(3 - 11) + 10
But so far, none of the functions we have written has returned a
value.
In this chapter, we are going to write functions that return values,
which
we will call fruitful functions,"
So what's the difference between generating a value and returning a
value?
http://openbookproject.net/thinkCSpy/ch05.xhtml#index15
"The built-in functions we have used, such as abs,
pow, and max, have produced results. Calling each of
these functions generates a value, which we usually assign to a
variable or
use as part of an expression.
biggest = max(3, 7, 2, 5)
x = abs(3 - 11) + 10
But so far, none of the functions we have written has returned a
value.
In this chapter, we are going to write functions that return values,
which
we will call fruitful functions,"
So what's the difference between generating a value and returning a
value?