From 90c5361a76ea9d61dd138b9aff119a6ae6d83bb2 Mon Sep 17 00:00:00 2001 From: Filipenko <114gtrap@gmail.com> Date: Mon, 15 May 2023 18:14:48 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D1=88=D0=B5=D0=BD=D1=8B=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=B4=D0=B0=D1=87=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- task_01.py | 5 +++++ task_02.py | 4 ++++ task_03.py | 6 ++++++ task_04.py | 4 ++++ task_05.py | 2 ++ task_06.py | 3 +++ task_07.py | 5 +++++ task_08.py | 6 ++++++ 8 files changed, 35 insertions(+) create mode 100644 task_01.py create mode 100644 task_02.py create mode 100644 task_03.py create mode 100644 task_04.py create mode 100644 task_05.py create mode 100644 task_06.py create mode 100644 task_07.py create mode 100644 task_08.py diff --git a/task_01.py b/task_01.py new file mode 100644 index 0000000..43a4bf7 --- /dev/null +++ b/task_01.py @@ -0,0 +1,5 @@ +a = int(input()) +b = int(input()) +c = int(input()) +sum = a + b + c +print(sum) diff --git a/task_02.py b/task_02.py new file mode 100644 index 0000000..02d4880 --- /dev/null +++ b/task_02.py @@ -0,0 +1,4 @@ +b = int(input()) +h = int(input()) +result = 1/2 * b * h +print(result) diff --git a/task_03.py b/task_03.py new file mode 100644 index 0000000..350fc62 --- /dev/null +++ b/task_03.py @@ -0,0 +1,6 @@ +n = int(input()) # Students +k = int(input()) # Apples +students = int(k / n) +card = int(k % n) +print(students) +print(card) diff --git a/task_04.py b/task_04.py new file mode 100644 index 0000000..af9ee04 --- /dev/null +++ b/task_04.py @@ -0,0 +1,4 @@ +n = int(input()) +hour = n % (60 * 24) // 60 +minutes = n % 60 +print(hour, minutes) diff --git a/task_05.py b/task_05.py new file mode 100644 index 0000000..a3f05c0 --- /dev/null +++ b/task_05.py @@ -0,0 +1,2 @@ +name = input() +print(f"Hello, {name}") diff --git a/task_06.py b/task_06.py new file mode 100644 index 0000000..1ef27df --- /dev/null +++ b/task_06.py @@ -0,0 +1,3 @@ +num = int(input()) +print("The next number for the number " + str(num) + " is " + str(num + 1)) +print("The previous number for the number " + str(num) + " is " + str(num - 1)) diff --git a/task_07.py b/task_07.py new file mode 100644 index 0000000..0092439 --- /dev/null +++ b/task_07.py @@ -0,0 +1,5 @@ +a = int(input()) +b = int(input()) +c = int(input()) +sum = int(a // 2 + b // 2 + c // 2 + a % 2 + b % 2 + c % 2) +print(sum) diff --git a/task_08.py b/task_08.py new file mode 100644 index 0000000..4c5a509 --- /dev/null +++ b/task_08.py @@ -0,0 +1,6 @@ +a = int(input()) +b = int(input()) +l = int(input()) +n = int(input()) +result = (a * n + b*(n-1) + l) * 2 - a +print(result)