From 90ecb0130140af7770fbd64f45c64d047f6abd2b Mon Sep 17 00:00:00 2001 From: user_2i Date: Tue, 9 Dec 2025 15:36:17 +0500 Subject: [PATCH] 20251209 --- lesson2.1_1.py | 4 ++++ lesson2.1_10.py | 13 +++++++++++++ lesson2.1_11.py | 12 ++++++++++++ lesson2.1_12.py | 13 +++++++++++++ lesson2.1_13.py | 7 +++++++ lesson2.1_14.py | 7 +++++++ lesson2.1_15.py | 10 ++++++++++ lesson2.1_16.py | 7 +++++++ lesson2.1_17.py | 6 ++++++ lesson2.1_18.py | 6 ++++++ lesson2.1_19.py | 18 ++++++++++++++++++ lesson2.1_2.py | 6 ++++++ lesson2.1_20.py | 10 ++++++++++ lesson2.1_3.py | 6 ++++++ lesson2.1_4.py | 7 +++++++ lesson2.1_5.py | 7 +++++++ lesson2.1_6.py | 12 ++++++++++++ lesson2.1_7.py | 5 +++++ lesson2.1_8.py | 6 ++++++ lesson2.1_9.py | 6 ++++++ 20 files changed, 168 insertions(+) create mode 100644 lesson2.1_1.py create mode 100644 lesson2.1_10.py create mode 100644 lesson2.1_11.py create mode 100644 lesson2.1_12.py create mode 100644 lesson2.1_13.py create mode 100644 lesson2.1_14.py create mode 100644 lesson2.1_15.py create mode 100644 lesson2.1_16.py create mode 100644 lesson2.1_17.py create mode 100644 lesson2.1_18.py create mode 100644 lesson2.1_19.py create mode 100644 lesson2.1_2.py create mode 100644 lesson2.1_20.py create mode 100644 lesson2.1_3.py create mode 100644 lesson2.1_4.py create mode 100644 lesson2.1_5.py create mode 100644 lesson2.1_6.py create mode 100644 lesson2.1_7.py create mode 100644 lesson2.1_8.py create mode 100644 lesson2.1_9.py diff --git a/lesson2.1_1.py b/lesson2.1_1.py new file mode 100644 index 0000000..0a4f758 --- /dev/null +++ b/lesson2.1_1.py @@ -0,0 +1,4 @@ +'''****** Задание ******** + *Привет, Яндекс! +''' +print("Привет, Яндекс!") \ No newline at end of file diff --git a/lesson2.1_10.py b/lesson2.1_10.py new file mode 100644 index 0000000..b055d82 --- /dev/null +++ b/lesson2.1_10.py @@ -0,0 +1,13 @@ +'''****** Задание ******** + *Детский сад — штаны на лямках. +''' +name = input() +box = code = int(input()) +num = code % 10 +code = code // 10 +bed = code % 10 +group = code // 10 +print(f'Группа №{group}.') +print(f'{num}. {name}.') +print(f'Шкафчик: {box}.') +print(f'Кроватка: {bed}.') \ No newline at end of file diff --git a/lesson2.1_11.py b/lesson2.1_11.py new file mode 100644 index 0000000..f98d81f --- /dev/null +++ b/lesson2.1_11.py @@ -0,0 +1,12 @@ +'''****** Задание ******** + *Автоматизация игры. +''' +n = int(input()) +d = n % 10 +n //= 10 +c = n % 10 +n //= 10 +b = n % 10 +n //= 10 +a = n % 10 +print(b * 1000 + a * 100 + d * 10 + c) \ No newline at end of file diff --git a/lesson2.1_12.py b/lesson2.1_12.py new file mode 100644 index 0000000..fa19ba7 --- /dev/null +++ b/lesson2.1_12.py @@ -0,0 +1,13 @@ +'''****** Задание ******** + *Интересное сложение. +''' +first = int(input()) +second = int(input()) +f1 = first % 10 +f2 = first // 10 % 10 +f3 = first // 100 +s1 = second % 10 +s2 = second // 10 % 10 +s3 = second // 100 +num = (f3 + s3) % 10 * 100 + (f2 + s2) % 10 * 10 + (f1 + s1) % 10 +print(num) \ No newline at end of file diff --git a/lesson2.1_13.py b/lesson2.1_13.py new file mode 100644 index 0000000..5a93b98 --- /dev/null +++ b/lesson2.1_13.py @@ -0,0 +1,7 @@ +'''****** Задание ******** + *Дед Мороз и конфеты. +''' +N = int(input()) +M = int(input()) +print(M // N) +print(M % N) \ No newline at end of file diff --git a/lesson2.1_14.py b/lesson2.1_14.py new file mode 100644 index 0000000..5dce4b9 --- /dev/null +++ b/lesson2.1_14.py @@ -0,0 +1,7 @@ +'''****** Задание ******** + *Шарики и ручки. +''' +red = int(input()) +green = int(input()) +blue = int(input()) +print(red + blue + 1) \ No newline at end of file diff --git a/lesson2.1_15.py b/lesson2.1_15.py new file mode 100644 index 0000000..96be79b --- /dev/null +++ b/lesson2.1_15.py @@ -0,0 +1,10 @@ +'''****** Задание ******** + *В ожидании доставки. +''' +N = int(input()) +M = int(input()) +T = int(input()) +M = M + T +N = (N + M // 60) % 24 +M = M % 60 +print(f'{N:02}:{M:02}') \ No newline at end of file diff --git a/lesson2.1_16.py b/lesson2.1_16.py new file mode 100644 index 0000000..2e921ab --- /dev/null +++ b/lesson2.1_16.py @@ -0,0 +1,7 @@ +'''****** Задание ******** + *Доставка. +''' +A = int(input()) +B = int(input()) +C = int(input()) +print(f'{(B - A) / C:.2f}') \ No newline at end of file diff --git a/lesson2.1_17.py b/lesson2.1_17.py new file mode 100644 index 0000000..5c5eb26 --- /dev/null +++ b/lesson2.1_17.py @@ -0,0 +1,6 @@ +'''****** Задание ******** + *Ошибка кассового аппарата. +''' +summa = int(input()) +number = int(input(), 2) +print(f'{summa + number}') \ No newline at end of file diff --git a/lesson2.1_18.py b/lesson2.1_18.py new file mode 100644 index 0000000..8141917 --- /dev/null +++ b/lesson2.1_18.py @@ -0,0 +1,6 @@ +'''****** Задание ******** + *Сдача 10. +''' +summa = int(input(), 2) +number = int(input()) +print(f'{number - summa}') \ No newline at end of file diff --git a/lesson2.1_19.py b/lesson2.1_19.py new file mode 100644 index 0000000..5d487eb --- /dev/null +++ b/lesson2.1_19.py @@ -0,0 +1,18 @@ +'''****** Задание ******** + *Украшение чека. +''' +good = input() +price = int(input()) +weight = int(input()) +cash = int(input()) +price_string = str(weight) + 'кг * ' + str(price) + 'руб/кг' +sum_string = str(price * weight) + 'руб' +cash_string = str(cash) + 'руб' +change_string = str(cash - price * weight) + 'руб' +print('================Чек================') +print(f'Товар: {good:>28}') +print(f'Цена: {price_string:>29}') +print(f'Итого: {sum_string:>28}') +print(f'Внесено: {cash_string:>26}') +print(f'Сдача: {change_string:>28}') +print('===================================') \ No newline at end of file diff --git a/lesson2.1_2.py b/lesson2.1_2.py new file mode 100644 index 0000000..65daec3 --- /dev/null +++ b/lesson2.1_2.py @@ -0,0 +1,6 @@ +'''****** Задание ******** + * Привет, всем! +''' +print("Как Вас зовут?") +name = input() +print(f"Привет, {name}") \ No newline at end of file diff --git a/lesson2.1_20.py b/lesson2.1_20.py new file mode 100644 index 0000000..ffec0d9 --- /dev/null +++ b/lesson2.1_20.py @@ -0,0 +1,10 @@ +'''****** Задание ******** + *Мухи отдельно, котлеты отдельно. +''' +total_weight = int(input()) +total_price = int(input()) +price_1 = int(input()) +price_2 = int(input()) +weight_1 = int((total_price - price_2) * total_weight / (price_1 - price_2)) +weight_2 = int(total_weight - weight_1) +print(weight_1, weight_2) \ No newline at end of file diff --git a/lesson2.1_3.py b/lesson2.1_3.py new file mode 100644 index 0000000..a933a2e --- /dev/null +++ b/lesson2.1_3.py @@ -0,0 +1,6 @@ +'''****** Задание ******** + *Излишняя автоматизация. +''' +string = input() +string = string + '\n' +print(string * 3) \ No newline at end of file diff --git a/lesson2.1_4.py b/lesson2.1_4.py new file mode 100644 index 0000000..91ab1f3 --- /dev/null +++ b/lesson2.1_4.py @@ -0,0 +1,7 @@ +'''****** Задание ******** + *Сдача. +''' +has = int(input()) +need = int(38 * 2.5) +answer = has - need +print(answer) \ No newline at end of file diff --git a/lesson2.1_5.py b/lesson2.1_5.py new file mode 100644 index 0000000..e0bfb17 --- /dev/null +++ b/lesson2.1_5.py @@ -0,0 +1,7 @@ +'''****** Задание ******** + *Магазин. +''' +price = int(input()) +weight = int(input()) +money = int(input()) +print(money - price * weight) \ No newline at end of file diff --git a/lesson2.1_6.py b/lesson2.1_6.py new file mode 100644 index 0000000..3ff03b7 --- /dev/null +++ b/lesson2.1_6.py @@ -0,0 +1,12 @@ +'''****** Задание ******** + *Чек. +''' +product = input() +weight = int(input()) +price = int(input()) +cash = int(input()) +print('Чек') +print(f'{product} - {price}кг - {weight}руб/кг') +print(f'Итого: {weight * price}руб') +print(f'Внесено: {cash}руб') +print(f'Сдача: {cash - weight * price}руб') \ No newline at end of file diff --git a/lesson2.1_7.py b/lesson2.1_7.py new file mode 100644 index 0000000..08deb56 --- /dev/null +++ b/lesson2.1_7.py @@ -0,0 +1,5 @@ +'''****** Задание ******** + *Делу — время, потехе — час. +''' +a = int(input()) +print("Купи слона!\n" * a, end='') \ No newline at end of file diff --git a/lesson2.1_8.py b/lesson2.1_8.py new file mode 100644 index 0000000..0af2d45 --- /dev/null +++ b/lesson2.1_8.py @@ -0,0 +1,6 @@ +'''****** Задание ******** + *Наказание. +''' +a = int(input()) +string = input() +print(f'Я больше никогда не буду писать "{string}"!\n' * a, end='') \ No newline at end of file diff --git a/lesson2.1_9.py b/lesson2.1_9.py new file mode 100644 index 0000000..b0c9ee8 --- /dev/null +++ b/lesson2.1_9.py @@ -0,0 +1,6 @@ +'''****** Задание ******** + *Деловая колбаса. +''' +M = int(input()) +N = int(input()) +print(int(N * M / 2)) \ No newline at end of file