Created
July 4, 2021 20:39
-
-
Save brentxphillips/6fcda0174848912ea32ecf6cb5672903 to your computer and use it in GitHub Desktop.
Simple value return test, boolean test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple value returning function, with nested conditional and boolean check/return | |
# return_test5.py | |
def pass_info(x, y): | |
add = x + y | |
# adding a nested condition and operation doesn't seem to impact return statement | |
if add < 10: | |
boo = False | |
return boo | |
def main(): | |
output = pass_info(5, 4) | |
# checks if boolean value is passed properly | |
if output == False: | |
print("the output is False") | |
main() | |
# outputs: the output is False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment