калькулятор
This commit is contained in:
commit
d562cb47b0
10
calculator.py
Normal file
10
calculator.py
Normal file
@ -0,0 +1,10 @@
|
||||
a = float(input("Введите число:"))
|
||||
op = input("Введите операцию,(+ *)")
|
||||
b = float(input("Введите второе число:"))
|
||||
if op == "+":
|
||||
otvet = a + b
|
||||
elif op =="*":
|
||||
otvet = a * b
|
||||
else:
|
||||
otvet = "к сожалению в этой версии нет / и - :("
|
||||
print(f"Результат: {otvet}")
|
||||
Loading…
Reference in New Issue
Block a user