From 446530ff8e29915c164432ad3ead2799da40963b Mon Sep 17 00:00:00 2001 From: Zver Date: Sat, 22 Nov 2025 10:35:35 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=2017=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=B4=D0=B0=D0=BD=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lesson.17.20 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 lesson.17.20 diff --git a/lesson.17.20 b/lesson.17.20 new file mode 100644 index 0000000..7285e9c --- /dev/null +++ b/lesson.17.20 @@ -0,0 +1,14 @@ +''' ****** Задание 17 из 20 Параграф 2.1 ********* +* Напишите программу, которая поможет магазину посчитать общую сумму выручки, + учитывая, что кассовый аппарат выдаёт сумму последней покупки в двоичной системе счисления. +''' + + +if __name__ == "__main__" +decimal_sum = int(input()) +binary_purchase = input() + +decimal_purchase = int(binary_purchase, 2) +total_sum = decimal_sum + decimal_purchase + +print(total_sum) \ No newline at end of file