Обновить My_second_comit
This commit is contained in:
parent
930042e906
commit
5957c6331d
30
My_second_comit
Normal file
30
My_second_comit
Normal 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("Такое не умеем")
|
||||||
|
|
||||||
@ -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("Вы ввели неправильное значение!!!")
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user