From 0c3a4d975e02a7427050dd2100733b6983848364 Mon Sep 17 00:00:00 2001 From: user <@regina> Date: Wed, 3 Dec 2025 11:57:18 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=B4=D0=B0=D0=BD=D0=B8=D0=B5=2019?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 2.1_lesson.19.20.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 2.1_lesson.19.20.py diff --git a/2.1_lesson.19.20.py b/2.1_lesson.19.20.py new file mode 100644 index 0000000..290f2ec --- /dev/null +++ b/2.1_lesson.19.20.py @@ -0,0 +1,19 @@ +****** Задание 19 Параграф 2.1 ****** +****** Напишите программу, которая выводит красиво оформленный чек. Все строки в чеке должны быть длиной ровно 35 символов, текст выровнен в соответствии с примером. ****** + +if name == "main": + name = input() + price = int(input()) + weight = int(input()) + money = int(input()) + + total = price * weight + change = money - total + + print(f'{"Чек":=^35}') + print(f'Товар:{name:>29}') + print(f'Цена:{f"{weight}кг * {price}руб/кг":>30}') + print(f'Итого:{f"{total}руб":>29}') + print(f'Внесено:{f"{money}руб":>27}') + print(f'Сдача:{f"{change}руб":>29}') + print(f'=' * 35) \ No newline at end of file