From 5957c6331da765fc6fc2743bed7485f8ac3a1af2 Mon Sep 17 00:00:00 2001 From: IvaevR Date: Thu, 27 Nov 2025 08:58:18 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20My=5Fsecond=5Fcomit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- My_second_comit | 30 ++++++++++++++++++++++++++++++ calculator.py | 10 ---------- 2 files changed, 30 insertions(+), 10 deletions(-) create mode 100644 My_second_comit delete mode 100644 calculator.py diff --git a/My_second_comit b/My_second_comit new file mode 100644 index 0000000..638b80e --- /dev/null +++ b/My_second_comit @@ -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("Такое не умеем") + \ No newline at end of file diff --git a/calculator.py b/calculator.py deleted file mode 100644 index 9a92d51..0000000 --- a/calculator.py +++ /dev/null @@ -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("Вы ввели неправильное значение!!!") - \ No newline at end of file