Last active
July 4, 2021 20:38
-
-
Save brentxphillips/fa507765cf04eda4c4d82afbbcd3cbf1 to your computer and use it in GitHub Desktop.
Simple value return function, with nested conditional
This file contains hidden or 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, two retunred values | |
| # return_test4.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: | |
| add = 11 | |
| return add | |
| def main(): | |
| output = pass_info(5, 4) | |
| print(output) | |
| main() | |
| # outputs: 11 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment