From 27b34e7a2c58905ac138db2139f78a12da276bfe Mon Sep 17 00:00:00 2001 From: shariik Date: Tue, 2 Dec 2025 11:03:07 +0500 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B4=D0=B0=D0=BD=D0=B8=D0=B5=206?= =?UTF-8?q?=20=D0=B2=D1=8B=D0=BF=D0=BE=D0=BB=D0=BD=D0=B8=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 2.1_lesson.6.20.ру.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 2.1_lesson.6.20.ру.py diff --git a/2.1_lesson.6.20.ру.py b/2.1_lesson.6.20.ру.py new file mode 100644 index 0000000..78eaa7e --- /dev/null +++ b/2.1_lesson.6.20.ру.py @@ -0,0 +1,12 @@ +****** Параграф 2.1 Задание 6 ****** +****** Напишите программу, которая рассчитывает стоимость покупки и печатает чек в заданном формате. Итоговая стоимость вычисляется как произведение цены за килограмм и веса товара. Гарантируется, что у покупателя достаточно денег для покупки.****** + +item = input() +price = int(input()) +weight = int(input()) +money = int(input()) +print('Чек', f'{item} - {weight}кг - {price}руб/кг', sep='\n') +print(f'Итого: {int(price * weight)}руб') +print(f'Внесено: {money}руб') +print(f'Сдача: {int(money - price * weight)}руб') +