# 1
from builtins import print
a = int(input())
b = int(input())
c = int(input())
d = int(input())
if (a + b + c + d) == (a * b * c * d):
print('Сумма и произведения равны')
else:
if (a + b + c + d) < (a * b * c * d):
print('Cумма меньше произведения')
else:
print('Сумма больше произведения')
#2
sum = 0
for i in range(4):
a = int(input())
if a > 0:
sum+=a
print(sum)
# 3
sum = 0
for i in range(4):
a = int(input())
if a < 0:
sum += a
print(sum)
# 4
minus = 0
plus = 0
null = 0
for i in range(4):
a = int(input())
if a < 0:
minus += 1
else:
if a > 0:
plus += 1
else:
null += 1
print('Положительных {}, отрицательных {}, нулей {}'.format(plus, minus, null))
# 5
a = int(input())
b = int(input())
polusum = (a * b) / 2
ydvoen = 2 * a * b
if a > b:
a = polusum
b = ydvoen
else:
b = polusum
a = ydvoen
print(a, b)
# 6
z = []
for i in range(3):
z.append(input())
if z[0] == min(z):
z[0] = 0
else:
if z[1] == min(z):
z[1] = 0
else:
z[2] = 0
print(z)
#7
z = []
for i in range(4):
z.append(int(input()))
print(max(z)-min(z))
# 8
M = 0
kvartal = 0
M = int(input())
if (M > 1) and (M < 4):
kvartal = 1
print('Квартал - ', kvartal)
else:
if (M > 3) and (M < 7):
kvartal = 2
print('Квартал - ', kvartal)
else:
if (M > 6) and (M < 10):
kvartal = 3
print('Квартал - ', kvartal)
else:
if (M > 9) and (M < 13):
kvartal = 4
print('Квартал - ', kvartal)
if kvartal == 0:
print('Введён неккоректный месяц')
# 9
list = ['крыса', 'корова', 'тигр', 'заяц', 'дракон', 'змея', 'лошадь', 'овца', 'обезьяна', 'петух', 'собака', 'свинья']
god = int(input())
opred = (god - 1995) % 12 - 1
print(list[opred])
import sys
from PyQt5 import QtWidgets
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName("Form")
Form.resize(400, 181)
self.text_edit = QtWidgets.QTextEdit(Form)
self.text_edit.setGeometry(QtCore.QRect(10, 10, 371, 71))
font = QtGui.QFont()
font.setPointSize(36)
self.text_edit.setFont(font)
self.text_edit.setObjectName("text_edit")
self.button = QtWidgets.QPushButton(Form)
self.button.setGeometry(QtCore.QRect(10, 90, 371, 81))
font = QtGui.QFont()
font.setPointSize(28)
self.button.setFont(font)
self.button.setObjectName("button")
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
_translate = QtCore.QCoreApplication.translate
Form.setWindowTitle(_translate("Form", "Form"))
self.text_edit.setHtml(_translate("Form", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:36pt; font-weight:400; font-style:normal;\">\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>"))
self.button.setText(_translate("Form", "дізнатися відповідь"))
class MyApp(QtWidgets.QMainWindow, Ui_Form):
def __init__(self):
super().__init__()
self.setupUi(self)
self.button.clicked.connect(self.button_click)
def button_click(self):
for i in range(10):
if str(i) in self.text_edit.toPlainText():
break
else:
self.text_edit.setPlainText('Спочатку введіть числа')
return
l = list(map(int, self.text_edit.toPlainText().split()))
if l == l[::-1]:
self.text_edit.setPlainText('Так')
else:
self.text_edit.setPlainText('Нi')
def main():
app = QtWidgets.QApplication(sys.argv)
window = MyApp()
window.show()
app.exec_()
if __name__ == '__main__':
main()
1.Б
2.В
3.А
4.Б
Объяснение:
я не знаю точно ли правильно но надеюсь что правильно