Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a=float(input())
- b=float(input())
- x = input()
- if x=="mod":
- if b!=0 or b!=0.0:
- print (a%b)
- else:
- print ("Деление на 0!")
- elif x=="/":
- if b!=0 or b!=0.0:
- print (a/b)
- else:
- print ("Деление на 0!")
- elif x=="div":
- if b!=0 or b!=0.0:
- print (a//b)
- else:
- print ("Деление на 0!")
- elif x=="pow":
- print (a**b)
- elif x=="+":
- print (a+b)
- elif x=="-":
- print (a-b)
- elif x=="*":
- print (a*b)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement