S
sl33k_
How does "return True" and "return False" affect the execution of the
calling function?
calling function?
return TrueHow does "return True" and "return False" affect the execution of the
calling function? pass
None
return
None
return FalseTrue
return 'Strawman'False
How does "return True" and "return False" affect the execution of the
calling function?
How does "return True" and "return False" affect the execution of the
calling function?
How does "return True" and "return False" affect the execution of the
calling function?
How does "return True" and "return False" affect the execution of the
calling function?
mpnordland said:Basically it will affect it in whatever way you design it to for example:
def lie_test(statement):
if statement is True:
return False
else:
return False
Now, this is psuedo code somewhat.
"if statement is True:" would always equate to "True" unless statement
was an empty string, None, or 0.
or said:As to return False if statement equals
true, look at the function name. It is testing to see if it is a lie,
and if it is true, then it's not a lie.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.