Feb-20-2018, 01:05 AM
In your "main" function, you need to change you're elif's to look like the "if" statement, you can also remove all the redundant parenthesis:
if operation == '+': print(add(var1, var2)) elif operation == '-': print(sub(var1, var2)) elif operation == '*': print(mul(var1, var2)) else: print(div(var1, var2))Then you need to call the function "main()". Add this to the end of your script:
if __name__ == "__main__": main()
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition