Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = float(input("Введите первое число: "))
- b = float(input("Введите второе число: "))
- make = str(input("Что требуется (+, -, *, /): "))
- if make == "+":
- c = a+b
- print("Результат" + str(c))
- elif make == "-":
- c = a-b
- print("Результат" + str(c))
- elif make == "*":
- c = a*b
- print("Результат" + str(c))
- elif make == "/":
- if a == 0 or b == 0:
- print("На ноль делить нельзя")
- else:
- c = a/b
- print("Результат" + str(c))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement