Обновить My_second_comit

This commit is contained in:
IvaevR 2025-11-27 08:58:18 +00:00
parent 930042e906
commit 5957c6331d
2 changed files with 30 additions and 10 deletions

30
My_second_comit Normal file
View File

@ -0,0 +1,30 @@
a = int(input("Введи первое число"))
b = int(input("Введи первое число"))
d = str(input("Что будем делать?"))
if d == "*":
c = a*b
print("Твой ответ", c)
elif d == "умножить":
c = a*b
print("Твой ответ", c)
elif d == "сложить":
c = a+b
print("Твой ответ", c)
elif d == "+":
c = a+b
print("Твой ответ", c)
elif d == "-":
c = a-b
print("Твой ответ", c)
elif d == "разность":
c = a-b
print("Твой ответ", c)
elif d == "/":
c = a/b
print("Твой ответ", c)
elif d == "делить":
c = a/b
print("Твой ответ", c)
else:
print("Такое не умеем")

View File

@ -1,10 +0,0 @@
a=int(input("1 цифра: "))
c=input("Выберите способ вычисления(- или /): ")
b=int(input("2 цифра: "))
if c=="-":
print("Ответ: ", a-b)
elif c=="/":
print("Ответ: ", a/b)
else:
print("Вы ввели неправильное значение!!!")