Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = input("firstnum")
- b = input("secondnum")
- operation = input("op")
- if operation == '+':
- print(a+b)
- elif operation == '*':
- print(a*b)
- elif operation == '/':
- if b == 0:
- print("division by 0")
- else:
- print(a/b)
- elif operation == '%':
- if b == 0:
- print("division by 0")
- else:
- print(a%b)
- else:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement