Обновить calcul.py
This commit is contained in:
parent
fb7d181e2e
commit
4770463f8e
10
calcu.py
10
calcu.py
@ -1,10 +0,0 @@
|
|||||||
def calculator():
|
|
||||||
operation = input("Введите операцию (+ или *): ")
|
|
||||||
num1 = float(input("первое число: "))
|
|
||||||
num2 = float(input("второе число: "))
|
|
||||||
if operation == '+':
|
|
||||||
result = num1 + num2
|
|
||||||
elif operation == '*':
|
|
||||||
|
|
||||||
result = num1 * num2
|
|
||||||
print(f"Результат: {result}")
|
|
||||||
Loading…
Reference in New Issue
Block a user