Skip to content

Instantly share code, notes, and snippets.

@brentxphillips
Created July 4, 2021 20:39
Show Gist options
  • Save brentxphillips/6fcda0174848912ea32ecf6cb5672903 to your computer and use it in GitHub Desktop.
Save brentxphillips/6fcda0174848912ea32ecf6cb5672903 to your computer and use it in GitHub Desktop.
Simple value return test, boolean test
# 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