Загрузить файлы в «/»
This commit is contained in:
parent
77e9100087
commit
6b5159e754
17
calc1.py
Normal file
17
calc1.py
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
num1 = float(input("ввелите 1 число:"))
|
||||||
|
num2 = float(input("ввелите 2 число:"))
|
||||||
|
operator = (input("введите знак:+,*,-,/:"))
|
||||||
|
if operator == "+":
|
||||||
|
result = num1 + num2
|
||||||
|
print(result)
|
||||||
|
elif operator == "*":
|
||||||
|
result = num1 * num2
|
||||||
|
print(result)
|
||||||
|
elif operator == "-":
|
||||||
|
result = num1 - num2
|
||||||
|
print(result)
|
||||||
|
elif operator == "/":
|
||||||
|
result = num1 / num2
|
||||||
|
print(result)
|
||||||
|
else:
|
||||||
|
print("ошибка")
|
||||||
Loading…
Reference in New Issue
Block a user