Computer Science

Differentiate between fruitful functions and non-fruitful functions.

Python Functions

5 Likes

Answer

Fruitful functionsNon-fruitful functions
Functions returning some value are called as fruitful functions.Functions that does not return any value are called as non-fruitful functions.
They are also called as non-void functions.They are also called as void functions.
They have return statements in the syntax : return<value>.They may or may not have a return statement, but if they do, it typically appears as per syntax : return.
Fruitful functions return some computed result in terms of a value.Non-fruitful functions return legal empty value of Python, which is None, to their caller.

Answered By

4 Likes


Related Questions