Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a=float(input("Enter first number:"))
- b=float(input("Enter second number:"))
- c=input("Enter operation (+, -, *, /):")
- if c=="+":
- d=a+b
- print("Result:", d)
- elif c=="-":
- d=a-b
- print("Result:", d)
- elif c=="*":
- d=a*b
- print("Result:", d)
- elif c=="/":
- if b==0:
- print("division by zero!")
- else:
- d=a/b
- print("Result:", d)
- else:
- print("you entered unsupported operation")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement