Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func = str(input("Operation? [+; -; *; /]: "))
- a = int(input("First variable: "))
- b = int(input("Second variable: "))
- if func == "+":
- c = a + b
- print(c)
- elif func == "-":
- c = a - b
- print(c)
- elif func == func == "*":
- c = a * b
- print(c)
- elif func == "/":
- c = a / b
- print(c)
- input()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement