Back Navigation Next Navigation Conceptual Review (page 49 of 55)

User defined functions may be classified as either void or fruitful functions. A void function does not have a return statement while a fruitful function does. The following shows how to define a void function and call it.

functions


void functions just perform work (set of statements). A built-in function such as print() can be a void function. The statement "x = print('bill')" would not make much sense because the print function does not return anything. x would be a None type. In the above custom example, it would make no sense to execute "x = print_lyrics()" because print_lyrics() does not return anything. x would be a None type.