Last active
December 31, 2016 03:57
-
-
Save jarehec/daa80982c8be1ea18e6a92a279251d66 to your computer and use it in GitHub Desktop.
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
numb1 = float(input('first number: ')) | |
op = input('choose an operator: /,*,-,+ ') | |
numb2 = float(input('second number: ')) | |
if op == '/': | |
print(numb1 / numb2) | |
elif op == '*': | |
print(numb1*numb2) | |
elif op == '-': | |
print(numb1 - numb2) | |
elif op == '+': | |
print(numb1+numb2) | |
else: | |
print('Invalid operator') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment