Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 13 Online
OpenStudy (anonymous):

Should a function always return a value?

OpenStudy (anonymous):

"In Python, functions always return a value. If you don't explicitly return a value, Python assumes the return value is None." http://www.codepedia.com/1/BeginnersGuideToPython_Functions

OpenStudy (anonymous):

As a general statement, yes, a function should always return a value, even if a flag only (None, NULL, etc), as opposed to a procedure that won't return anything. Compare Pascal's procedure, for instance, to Python's def statement.

OpenStudy (anonymous):

Python answer no - sometimes functions are methods that act upon things but don't return anything

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!