# print_return.py # Walker M. White (wmw2) # August 31, 2014 """Module do demonstrate the difference between print and return The command print displays a value on screen, but it does not use that value when it evaluates the function. The command return instructs a function call to evaluate to that value.""" def print_plus(n): """Prints the value of n+1 to the screen. This function does not return anything, so a function call does not evaluate to anything: it is a procedure. Precondition: n is a number""" print (n+1) def return_plus(n): """Returns the value of n+1 to the screen. This function is a fruitful function and can be used in expressions. However, it does not necessarily display anything on screen. Precondition: n is a number""" return (n+1)