Загрузить файлы в «/»
This commit is contained in:
commit
990b7e9198
13
calcul
Normal file
13
calcul
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
def calculator():
|
||||||
|
operation= input("+,*,-,/")
|
||||||
|
number1=float(input("1 число: "))
|
||||||
|
number2=float(input("2 число: "))
|
||||||
|
if operation== '+':
|
||||||
|
result=number1+number2
|
||||||
|
elif operation== '*':
|
||||||
|
result=number1*number2
|
||||||
|
elif operation=='-':
|
||||||
|
result=number1-number2
|
||||||
|
elif operation=='/':
|
||||||
|
result= number1/number2
|
||||||
|
print(f"Результат: {result}")
|
||||||
Loading…
Reference in New Issue
Block a user