This commit is contained in:
user_2i 2025-12-09 15:36:17 +05:00
parent 722debf8fb
commit 90ecb01301
20 changed files with 168 additions and 0 deletions

4
lesson2.1_1.py Normal file
View file

@ -0,0 +1,4 @@
'''****** Задание ********
*Привет, Яндекс!
'''
print("Привет, Яндекс!")

13
lesson2.1_10.py Normal file
View file

@ -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}.')

12
lesson2.1_11.py Normal file
View file

@ -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)

13
lesson2.1_12.py Normal file
View file

@ -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)

7
lesson2.1_13.py Normal file
View file

@ -0,0 +1,7 @@
'''****** Задание ********
*Дед Мороз и конфеты.
'''
N = int(input())
M = int(input())
print(M // N)
print(M % N)

7
lesson2.1_14.py Normal file
View file

@ -0,0 +1,7 @@
'''****** Задание ********
*Шарики и ручки.
'''
red = int(input())
green = int(input())
blue = int(input())
print(red + blue + 1)

10
lesson2.1_15.py Normal file
View file

@ -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}')

7
lesson2.1_16.py Normal file
View file

@ -0,0 +1,7 @@
'''****** Задание ********
*Доставка.
'''
A = int(input())
B = int(input())
C = int(input())
print(f'{(B - A) / C:.2f}')

6
lesson2.1_17.py Normal file
View file

@ -0,0 +1,6 @@
'''****** Задание ********
*Ошибка кассового аппарата.
'''
summa = int(input())
number = int(input(), 2)
print(f'{summa + number}')

6
lesson2.1_18.py Normal file
View file

@ -0,0 +1,6 @@
'''****** Задание ********
*Сдача 10.
'''
summa = int(input(), 2)
number = int(input())
print(f'{number - summa}')

18
lesson2.1_19.py Normal file
View file

@ -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('===================================')

6
lesson2.1_2.py Normal file
View file

@ -0,0 +1,6 @@
'''****** Задание ********
* Привет, всем!
'''
print("Как Вас зовут?")
name = input()
print(f"Привет, {name}")

10
lesson2.1_20.py Normal file
View file

@ -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)

6
lesson2.1_3.py Normal file
View file

@ -0,0 +1,6 @@
'''****** Задание ********
*Излишняя автоматизация.
'''
string = input()
string = string + '\n'
print(string * 3)

7
lesson2.1_4.py Normal file
View file

@ -0,0 +1,7 @@
'''****** Задание ********
*Сдача.
'''
has = int(input())
need = int(38 * 2.5)
answer = has - need
print(answer)

7
lesson2.1_5.py Normal file
View file

@ -0,0 +1,7 @@
'''****** Задание ********
*Магазин.
'''
price = int(input())
weight = int(input())
money = int(input())
print(money - price * weight)

12
lesson2.1_6.py Normal file
View file

@ -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}руб')

5
lesson2.1_7.py Normal file
View file

@ -0,0 +1,5 @@
'''****** Задание ********
*Делу — время, потехе — час.
'''
a = int(input())
print("Купи слона!\n" * a, end='')

6
lesson2.1_8.py Normal file
View file

@ -0,0 +1,6 @@
'''****** Задание ********
*Наказание.
'''
a = int(input())
string = input()
print(f'Я больше никогда не буду писать "{string}"!\n' * a, end='')

6
lesson2.1_9.py Normal file
View file

@ -0,0 +1,6 @@
'''****** Задание ********
*Деловая колбаса.
'''
M = int(input())
N = int(input())
print(int(N * M / 2))