From b5c5deed7aabcd7bb6a2973d775580068c779d6a Mon Sep 17 00:00:00 2001 From: fox Date: Mon, 15 Sep 2025 23:02:18 +0500 Subject: [PATCH 1/3] =?UTF-8?q?4=20=D0=B7=D0=B0=D0=B4=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 12-09/task4_rpo256.py | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 12-09/task4_rpo256.py diff --git a/12-09/task4_rpo256.py b/12-09/task4_rpo256.py new file mode 100644 index 0000000..ec5b99e --- /dev/null +++ b/12-09/task4_rpo256.py @@ -0,0 +1,43 @@ +import sys as os + +def get_percent(number): + if 0 <= number < 500: + return 3 + elif 500 <= number <= 1000: + return 5 + elif number >= 1000: + return 8 + +def salary(manag): + casing = 200 + percen = manag / 100 + summ = casing * percen + final = summ + casing + return final + +manager_1 = salary(get_percent(int(input("уровень продаж 1 менеджера :: ")))) +manager_2 = salary(get_percent(int(input("уровень продаж 2 менеджера :: ")))) +manager_3 = salary(get_percent(int(input("уровень продаж 3 менеджера :: ")))) +manager_top = max(manager_1, manager_2, manager_3) +manager_gener = [ manager_1, manager_2, manager_3 ] + +def why_manager(top): + if top == manager_1: + return 'Менеджер 1' + elif top == manager_2: + return 'Менеджер 2' + elif top == manager_3: + return 'Менеджер 3' +why_man = why_manager(manager_top) +favor_manager = manager_top + 200 + + + +print("Лучший менеджер: {}. Зарплата(с премией): {}$".format(why_man, favor_manager)) +print("---") +print("Остальные менеджеры:\n" + " - {}$, Первый менеджер\n" + " - {}$, Второй менеджер\n" + " - {}$, Третий менеджер" + .format(manager_1, manager_2, manager_3)) + From af34588addf1fb767e8ede73c35e312f5b8e246a Mon Sep 17 00:00:00 2001 From: chronoblade Date: Mon, 15 Sep 2025 20:04:19 +0200 Subject: [PATCH 2/3] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=2012-09/task4=5Frpo256.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 12-09/task4_rpo256.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/12-09/task4_rpo256.py b/12-09/task4_rpo256.py index ec5b99e..4e4ebf1 100644 --- a/12-09/task4_rpo256.py +++ b/12-09/task4_rpo256.py @@ -1,5 +1,3 @@ -import sys as os - def get_percent(number): if 0 <= number < 500: return 3 From 21945ea90585a388bff891639ffaa70cc140e080 Mon Sep 17 00:00:00 2001 From: fox Date: Mon, 15 Sep 2025 23:16:59 +0500 Subject: [PATCH 3/3] =?UTF-8?q?=D0=97=D0=B0=D0=B1=D1=8B=D0=BB=20=D0=BE?= =?UTF-8?q?=D0=B1=203=20=D0=B7=D0=B0=D0=B4=D0=B0=D0=BD=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 12-09/task3_rpo254.py | 45 +++++++++++++++++++++++++++++++++++++++---- 12-09/task4_rpo254.py | 41 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+), 4 deletions(-) create mode 100644 12-09/task4_rpo254.py diff --git a/12-09/task3_rpo254.py b/12-09/task3_rpo254.py index 04c8483..8f5909b 100644 --- a/12-09/task3_rpo254.py +++ b/12-09/task3_rpo254.py @@ -1,4 +1,41 @@ -available_operators = [ "mts", "tmobile", "t2", "yota" ] -print("Подерживаемые операторы:\n" - join(available_operators)) -operator = int(input("Введите Оператора: ")) \ No newline at end of file +import sys as os + +price_call = int(input("Стоймость разговора, в мин :: ")) +operators = [ + "tmobile", + "t2", + "mts", + "yota" +] + +print("Список доступных операторов:") +for el in operators: + print(f" - {el}") + +def operator_func(operator_num): + match operator_num: + case "tmobile": + math_num = 3.9 * price_call + print("{} Rub".format(math_num)) + os.exit(1) + case "t2": + math_num = 3.60 * price_call + print("{} Rub".format(math_num)) + os.exit(1) + case "mts": + math_num = 2.5 * price_call + print("{} Rub".format(math_num)) + os.exit(1) + case "yota": + math_num = 2.50 * price_call + print("{} Rub".format(math_num)) + os.exit(1) + case _: + print("Указан оператор не из списка!") + os.exit(0) + +operator_select = input('\n' "Введите оператора из списка :: ") +operator_func(operator_select) + + + diff --git a/12-09/task4_rpo254.py b/12-09/task4_rpo254.py new file mode 100644 index 0000000..4e4ebf1 --- /dev/null +++ b/12-09/task4_rpo254.py @@ -0,0 +1,41 @@ +def get_percent(number): + if 0 <= number < 500: + return 3 + elif 500 <= number <= 1000: + return 5 + elif number >= 1000: + return 8 + +def salary(manag): + casing = 200 + percen = manag / 100 + summ = casing * percen + final = summ + casing + return final + +manager_1 = salary(get_percent(int(input("уровень продаж 1 менеджера :: ")))) +manager_2 = salary(get_percent(int(input("уровень продаж 2 менеджера :: ")))) +manager_3 = salary(get_percent(int(input("уровень продаж 3 менеджера :: ")))) +manager_top = max(manager_1, manager_2, manager_3) +manager_gener = [ manager_1, manager_2, manager_3 ] + +def why_manager(top): + if top == manager_1: + return 'Менеджер 1' + elif top == manager_2: + return 'Менеджер 2' + elif top == manager_3: + return 'Менеджер 3' +why_man = why_manager(manager_top) +favor_manager = manager_top + 200 + + + +print("Лучший менеджер: {}. Зарплата(с премией): {}$".format(why_man, favor_manager)) +print("---") +print("Остальные менеджеры:\n" + " - {}$, Первый менеджер\n" + " - {}$, Второй менеджер\n" + " - {}$, Третий менеджер" + .format(manager_1, manager_2, manager_3)) +