first/calculator.py

12 lines
273 B
Python

a = float(input("Введите первое число"))
operation = input("+ или * ? ")
b = float(input("Введите второе число:"))
if operation == "+":
print(a+b)
elif operation == "*":
print(a*b)
else:
print("Ощибка")