From 27402001639c24f420b25a79845ae6a2e2e4c4ac Mon Sep 17 00:00:00 2001 From: Alisa Date: Sat, 21 Sep 2019 16:00:56 +0300 Subject: [PATCH 01/28] hello --- Hello | 1 + Hello.py | 1 + 2 files changed, 2 insertions(+) create mode 100644 Hello create mode 100644 Hello.py diff --git a/Hello b/Hello new file mode 100644 index 0000000..1385fe3 --- /dev/null +++ b/Hello @@ -0,0 +1 @@ +print("Hello, world!") \ No newline at end of file diff --git a/Hello.py b/Hello.py new file mode 100644 index 0000000..1385fe3 --- /dev/null +++ b/Hello.py @@ -0,0 +1 @@ +print("Hello, world!") \ No newline at end of file From 0d53504bf107e27155b10d643bafacb895184317 Mon Sep 17 00:00:00 2001 From: Alisa Date: Sat, 21 Sep 2019 16:38:42 +0300 Subject: [PATCH 02/28] =?UTF-8?q?=D0=A0=D0=B5=D1=88=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D0=BF=D0=B5=D1=80=D0=B2=D0=B0=D1=8F=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=B4=D0=B0=D1=87=D0=B0,=20=D1=81=D0=BA=D0=BE=D0=BF?= =?UTF-8?q?=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BB=D0=B0=20=D0=B8=D0=B7=20?= =?UTF-8?q?=D0=BF=D0=B8=D1=82=D0=BE=D0=BD=D1=82=D1=8C=D1=8E=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=B0,=20=D0=B2=20=D0=BA=D0=BE=D1=82=D0=BE=D1=80=D0=BE?= =?UTF-8?q?=D0=BC=20=D0=B2=D1=81=D0=B5=20=D1=82=D0=B5=D1=81=D1=82=D1=8B=20?= =?UTF-8?q?=D1=81=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=D0=BB=D0=B8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- task1.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 task1.py diff --git a/task1.py b/task1.py new file mode 100644 index 0000000..2410169 --- /dev/null +++ b/task1.py @@ -0,0 +1,8 @@ +# Условие +# Дано число n. С начала суток прошло n минут. Определите, сколько часов и минут будут показывать электронные часы в этот момент. +# Программа должна вывести два числа: количество часов (от 0 до 23) и количество минут (от 0 до 59). +# Учтите, что число n может быть больше, чем количество минут в сутках. +n = int(input()) +n = n % 1440 +print(n // 60) +print(n % 60) From 819150e47cd29bf35266c7b3be3906e1844d39b2 Mon Sep 17 00:00:00 2001 From: Alisa Date: Mon, 23 Sep 2019 23:47:52 +0300 Subject: [PATCH 03/28] =?UTF-8?q?=D0=A0=D0=B5=D1=88=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D1=82=D1=80=D0=B5=D1=82=D1=8C=D1=8F=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=B4=D0=B0=D1=87=D0=B0,=20=D1=81=D0=BA=D0=BE=D0=BF?= =?UTF-8?q?=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BB=D0=B0=20=D0=B8=D0=B7=20?= =?UTF-8?q?=D0=BF=D0=B8=D1=82=D0=BE=D0=BD=D1=82=D1=8C=D1=8E=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=B0,=20=D0=B2=20=D0=BA=D0=BE=D1=82=D0=BE=D1=80=D0=BE?= =?UTF-8?q?=D0=BC=20=D0=B2=D1=81=D0=B5=20=D1=82=D0=B5=D1=81=D1=82=D1=8B=20?= =?UTF-8?q?=D1=81=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=D0=BB=D0=B8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- task3.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 task3.py diff --git a/task3.py b/task3.py new file mode 100644 index 0000000..2291af6 --- /dev/null +++ b/task3.py @@ -0,0 +1,10 @@ +#Даны три целых числа. Выведите значение наименьшего из них. +a = int(input()) +b = int(input()) +c = int(input()) +if a <= b and a <= c: + print(a) +elif b <= a and b <= c: + print(b) +else: + print(c) \ No newline at end of file From 5febcc53e8939082bf60f90c89f083a09bbe48b6 Mon Sep 17 00:00:00 2001 From: Alisa Date: Mon, 23 Sep 2019 23:53:39 +0300 Subject: [PATCH 04/28] =?UTF-8?q?=D0=A0=D0=B5=D1=88=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D1=87=D0=B5=D1=82=D0=B2=D0=B5=D1=80=D1=82=D0=B0?= =?UTF-8?q?=D1=8F=20=D0=B7=D0=B0=D0=B4=D0=B0=D1=87=D0=B0,=20=D1=81=D0=BA?= =?UTF-8?q?=D0=BE=D0=BF=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BB=D0=B0=20=D0=B8?= =?UTF-8?q?=D0=B7=20=D0=BF=D0=B8=D1=82=D0=BE=D0=BD=D1=82=D1=8C=D1=8E=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=B0,=20=D0=B2=20=D0=BA=D0=BE=D1=82=D0=BE=D1=80?= =?UTF-8?q?=D0=BE=D0=BC=20=D0=B2=D1=81=D0=B5=20=D1=82=D0=B5=D1=81=D1=82?= =?UTF-8?q?=D1=8B=20=D1=81=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=D0=BB=D0=B8?= =?UTF-8?q?.=20=D0=9C=D0=BE=D0=B6=D0=BD=D0=BE=20=D0=B1=D1=8B=D0=BB=D0=BE?= =?UTF-8?q?=20=D0=B1=D1=8B=20=D0=BD=D0=B0=D0=B2=D0=B5=D1=80=D0=BD=D0=BE?= =?UTF-8?q?=D0=B5=20=D0=BD=D0=B5=20=D0=B8=D1=81=D0=BF=D0=BE=D0=BB=D1=8C?= =?UTF-8?q?=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D1=8C=20=D0=BB=D0=B8=D0=BD=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D1=8B=D0=B5,=20=D0=BD=D0=BE=20=D0=BC=D0=BD=D0=B5=20=D1=82?= =?UTF-8?q?=D0=B0=D0=BA=20=D1=83=D0=B4=D0=BE=D0=B1=D0=BD=D0=B5=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- task4.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 task4.py diff --git a/task4.py b/task4.py new file mode 100644 index 0000000..8d7cce8 --- /dev/null +++ b/task4.py @@ -0,0 +1,14 @@ +#Длина Московской кольцевой автомобильной дороги —109 километров. Байкер Вася стартует с нулевого километра МКАД и едет со скоростью v километров в час. +# На какой отметке он остановится через t часов? +#Программа получает на вход значение v и t. Если v>0, то Вася движется в положительном направлении по МКАД, если же значение v<0, то в отрицательном. +#Программа должна вывести целое число от 0 до 108 — номер отметки, на которой остановится Вася. +v = int(input()) +t = int(input()) +j = v*t +i = abs(j) % 109 +if v > 0: + print(j % 109) +elif v<0 and i!=0: + print(109 - i) +else: + print(0) \ No newline at end of file From aa3195e27b69e345cdab220efc7e914b482dfde1 Mon Sep 17 00:00:00 2001 From: Alisa Date: Mon, 23 Sep 2019 23:55:34 +0300 Subject: [PATCH 05/28] =?UTF-8?q?=D0=A0=D0=B5=D1=88=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D0=BF=D1=8F=D1=82=D0=B0=D1=8F=20=D0=B7=D0=B0?= =?UTF-8?q?=D0=B4=D0=B0=D1=87=D0=B0,=20=D1=81=D0=BA=D0=BE=D0=BF=D0=B8?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B0=D0=BB=D0=B0=20=D0=B8=D0=B7=20=D0=BF?= =?UTF-8?q?=D0=B8=D1=82=D0=BE=D0=BD=D1=82=D1=8C=D1=8E=D1=82=D0=BE=D1=80?= =?UTF-8?q?=D0=B0,=20=D0=B2=20=D0=BA=D0=BE=D1=82=D0=BE=D1=80=D0=BE=D0=BC?= =?UTF-8?q?=20=D0=B2=D1=81=D0=B5=20=D1=82=D0=B5=D1=81=D1=82=D1=8B=20=D1=81?= =?UTF-8?q?=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=D0=BB=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- task5.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 task5.py diff --git a/task5.py b/task5.py new file mode 100644 index 0000000..07bc4b3 --- /dev/null +++ b/task5.py @@ -0,0 +1,10 @@ +#По данному натуральном n вычислите сумму 1!+2!+3!+...+n!. В решении этой задачи можно использовать только один цикл. +# Пользоваться математической библиотекой math в этой задаче запрещено. +n = int(input()) +sum = 0 +fac = 1 +for i in range(1, n + 1): + fac *= i + sum+=fac +print(sum) + From 4bb8aac91b3c72033d4c8465defefe4b88996eae Mon Sep 17 00:00:00 2001 From: Alisa Date: Mon, 23 Sep 2019 23:57:33 +0300 Subject: [PATCH 06/28] =?UTF-8?q?=D0=A0=D0=B5=D1=88=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D1=88=D0=B5=D1=81=D1=82=D0=B0=D1=8F=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=B4=D0=B0=D1=87=D0=B0,=20=D1=81=D0=BA=D0=BE=D0=BF?= =?UTF-8?q?=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BB=D0=B0=20=D0=B8=D0=B7=20?= =?UTF-8?q?=D0=BF=D0=B8=D1=82=D0=BE=D0=BD=D1=82=D1=8C=D1=8E=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=B0,=20=D0=B2=20=D0=BA=D0=BE=D1=82=D0=BE=D1=80=D0=BE?= =?UTF-8?q?=D0=BC=20=D0=B2=D1=81=D0=B5=20=D1=82=D0=B5=D1=81=D1=82=D1=8B=20?= =?UTF-8?q?=D1=81=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=D0=BB=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- task6.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 task6.py diff --git a/task6.py b/task6.py new file mode 100644 index 0000000..8c33d51 --- /dev/null +++ b/task6.py @@ -0,0 +1,14 @@ +#Последовательность состоит из различных натуральных чисел и завершается числом 0. +# Определите значение второго по величине элемента в этой последовательности. +# Гарантируется, что в последовательности есть хотя бы два элемента. +i = -1 +max1 = 0 +max2 = 0 +while i!= 0: + i = int(input()) + if i > max1: + max2 = max1 + max1 = i + elif i > max2: + max2 = i +print(max2) \ No newline at end of file From 2bf59baf806c184b345899064ba8b8ec36551664 Mon Sep 17 00:00:00 2001 From: Alisa Date: Sun, 6 Oct 2019 00:00:54 +0300 Subject: [PATCH 07/28] =?UTF-8?q?=D0=A0=D0=B5=D1=88=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D0=B2=D1=82=D0=BE=D1=80=D0=B0=D1=8F=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=B4=D0=B0=D1=87=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- task2.py | 11 +++++++++++ task3.py | 19 ++++++++++--------- 2 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 task2.py diff --git a/task2.py b/task2.py new file mode 100644 index 0000000..c4fdea7 --- /dev/null +++ b/task2.py @@ -0,0 +1,11 @@ +#Напишете программу, которая на вход берет строку text и целое число n, и выводит в слово Hello, а также n раз через запятую и пробел строку text. +# В конце выхода запятая не ставится. +# Например, для text = MIPT Students и n = 5 результат будет следующим: Hello, MIPT Students, MIPT Students, MIPT Students, MIPT Students, MIPT Students +if __name__ == '__main__': + line = input() + n = int(input()) + arr = [] + arr.append(line) + arr*=n + arr.insert(0, "Hello") + print(*arr, sep=", ") \ No newline at end of file diff --git a/task3.py b/task3.py index 2291af6..e984364 100644 --- a/task3.py +++ b/task3.py @@ -1,10 +1,11 @@ #Даны три целых числа. Выведите значение наименьшего из них. -a = int(input()) -b = int(input()) -c = int(input()) -if a <= b and a <= c: - print(a) -elif b <= a and b <= c: - print(b) -else: - print(c) \ No newline at end of file +if __name__ == '__main__': + a = int(input()) + b = int(input()) + c = int(input()) + if a <= b and a <= c: + print(a) + elif b <= a and b <= c: + print(b) + else: + print(c) \ No newline at end of file From 4feb10ba5a019e0c8de282aa9b8cc0ad535d5b0d Mon Sep 17 00:00:00 2001 From: Alisa Date: Sun, 6 Oct 2019 00:12:28 +0300 Subject: [PATCH 08/28] =?UTF-8?q?=D0=97=D0=B0=D0=B4=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=B1=D0=B5=D0=B7=20=D1=81=D0=BC=D1=8B=D1=81=D0=BB?= =?UTF-8?q?=D0=B0,=20=D1=82=D0=B0=D0=BA=20=D0=BA=D0=B0=D0=BA=20=D0=BF?= =?UTF-8?q?=D1=80=D0=BE=D1=81=D1=82=D0=BE=20=D0=BA=D0=BE=D0=BF=D0=B8=D0=BF?= =?UTF-8?q?=D0=B0=D1=81=D1=82,=20=D0=BD=D0=BE=20=D0=BF=D1=83=D1=81=D1=82?= =?UTF-8?q?=D1=8C=20=D0=B1=D1=83=D0=B4=D0=B5=D1=82.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hw3-task1.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 hw3-task1.py diff --git a/hw3-task1.py b/hw3-task1.py new file mode 100644 index 0000000..5834b27 --- /dev/null +++ b/hw3-task1.py @@ -0,0 +1,9 @@ +#Откройте произвольный текстовый редактор, например, spyder. Скопируйте туда текст программы, написанной выше. Сохраните текст в файле с именем hypot.py. +#Запустите терминал, перейдите в каталог, где лежит файл hypot.py и выполните эту программу:python3 hypot.py +#Интерпретатор языка Python вместо интерактивного режима выполнит последовательность команд из файла. +#При этом значения вычисленных выражений не выводятся на экран (в отличии от интерактивного режима), поэтому для того, чтобы вывести результат работы программы, то есть значение переменной c, нужна функция print(). +if __name__ == '__main__': + a = 179 + b = 197 + c = (a ** 2 + b ** 2) ** 0.5 + print(c) \ No newline at end of file From 86f7f1455aa47265a52ae9f14c0f92227f01a188 Mon Sep 17 00:00:00 2001 From: Alisa Date: Sun, 6 Oct 2019 00:15:37 +0300 Subject: [PATCH 09/28] =?UTF-8?q?=D0=90=D0=BD=D0=B0=D0=BB=D0=BE=D0=B3?= =?UTF-8?q?=D0=B8=D1=87=D0=BD=D0=BE=20=D0=BF=D0=B5=D1=80=D0=B2=D0=BE=D0=BC?= =?UTF-8?q?=D1=83=20=D0=B7=D0=B0=D0=B4=D0=B0=D0=BD=D0=B8=D1=8E.=20=D0=A7?= =?UTF-8?q?=D0=B5=D1=80=D0=B5=D0=BF=D0=B0=D1=85=D0=B0=20=D1=80=D0=B0=D0=B1?= =?UTF-8?q?=D0=BE=D1=82=D0=B0=D0=B5=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hw3-task2.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 hw3-task2.py diff --git a/hw3-task2.py b/hw3-task2.py new file mode 100644 index 0000000..53c9db4 --- /dev/null +++ b/hw3-task2.py @@ -0,0 +1,14 @@ +#Сохраните и выполните предыдущую программу. Убедитесь в том, что черепаха работает. +if __name__ == '__main__': + import turtle + + turtle.shape('turtle') + turtle.forward(50) + turtle.left(90) + turtle.forward(50) + turtle.left(90) + turtle.forward(50) + turtle.right(90) + turtle.forward(50) + turtle.right(90) + turtle.forward(50) \ No newline at end of file From 4b8a45bba1a05f39ec1ddfb028b4c57ad01b4304 Mon Sep 17 00:00:00 2001 From: Alisa Date: Sun, 6 Oct 2019 00:23:10 +0300 Subject: [PATCH 10/28] =?UTF-8?q?=D0=A0=D0=B5=D1=88=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D0=B7=D0=B0=D0=B4=D0=B0=D1=87=D0=B0=20=D0=BD?= =?UTF-8?q?=D0=BE=D0=BC=D0=B5=D1=80=20=D1=82=D1=80=D0=B8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hw3-task3.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 hw3-task3.py diff --git a/hw3-task3.py b/hw3-task3.py new file mode 100644 index 0000000..b97bb4f --- /dev/null +++ b/hw3-task3.py @@ -0,0 +1,11 @@ +#Нарисуйте квадрат. +if __name__ == '__main__': + import turtle + turtle.shape("turtle") + turtle.forward(90) + turtle.left(90) + turtle.forward(90) + turtle.left(90) + turtle.forward(90) + turtle.left(90) + turtle.forward(90) \ No newline at end of file From dbebe17befe18220c8dacb1a48a92c991a243161 Mon Sep 17 00:00:00 2001 From: Alisa Date: Sun, 6 Oct 2019 00:32:13 +0300 Subject: [PATCH 11/28] =?UTF-8?q?=D0=A0=D0=B5=D1=88=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D0=B7=D0=B0=D0=B4=D0=B0=D1=87=D0=B0=20=D0=BD?= =?UTF-8?q?=D0=BE=D0=BC=D0=B5=D1=80=20=D1=87=D0=B5=D1=82=D1=8B=D1=80=D0=B5?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hw3-task4.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 hw3-task4.py diff --git a/hw3-task4.py b/hw3-task4.py new file mode 100644 index 0000000..11f5519 --- /dev/null +++ b/hw3-task4.py @@ -0,0 +1,7 @@ +#Нарисуйте окружность. Воспользуйтесь тем фактом, что правильный многоугольник с большим числом сторон будет выглядеть как окружность. +if __name__ == '__main__': + import turtle + turtle.shape('turtle') + for i in range(360): + turtle.forward(1) + turtle.left(1) \ No newline at end of file From 4bce4c4796dde4c014cc2716bd199e80d796b3bb Mon Sep 17 00:00:00 2001 From: Alisa Date: Sun, 6 Oct 2019 00:47:37 +0300 Subject: [PATCH 12/28] =?UTF-8?q?=D0=A0=D0=B5=D1=88=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D0=B7=D0=B0=D0=B4=D0=B0=D1=87=D0=B0=20=D0=BD?= =?UTF-8?q?=D0=BE=D0=BC=D0=B5=D1=80=20=D0=BF=D1=8F=D1=82=D1=8C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hw3-task5.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 hw3-task5.py diff --git a/hw3-task5.py b/hw3-task5.py new file mode 100644 index 0000000..f40afa5 --- /dev/null +++ b/hw3-task5.py @@ -0,0 +1,18 @@ +#Нарисуйте 10 вложенных квадратов. +if __name__ == '__main__': + import turtle + turtle.shape('turtle') + for i in range(1, 10): + turtle.forward(10*i) + turtle.left(90) + turtle.forward(10*i) + turtle.left(90) + turtle.forward(10*i) + turtle.left(90) + turtle.forward(10*i) + turtle.penup() + turtle.forward(5) + turtle.right(90) + turtle.forward(5) + turtle.left(180) + turtle.pendown() \ No newline at end of file From 6cb186b2191ac68e77e80b734ea660bd728d1ac6 Mon Sep 17 00:00:00 2001 From: Alisa Date: Sun, 6 Oct 2019 12:56:07 +0300 Subject: [PATCH 13/28] =?UTF-8?q?=D0=A0=D0=B5=D1=88=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D0=B7=D0=B0=D0=B4=D0=B0=D1=87=D0=B0=20=D0=BD?= =?UTF-8?q?=D0=BE=D0=BC=D0=B5=D1=80=20=D1=88=D0=B5=D1=81=D1=82=D1=8C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hw3-task6.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 hw3-task6.py diff --git a/hw3-task6.py b/hw3-task6.py new file mode 100644 index 0000000..3cf31b6 --- /dev/null +++ b/hw3-task6.py @@ -0,0 +1,10 @@ +#Нарисуйте паука с n лапами. Пример n = 12: +if __name__ == '__main__': + n = int(input()) + import turtle + turtle.shape('turtle') + for i in range(1, n+1): + turtle.forward(90) + turtle.left(180) + turtle.forward(90) + turtle.left(180 + 360/n) \ No newline at end of file From 033b6bb646c3f22444c7c45a1e78137fb0c79da9 Mon Sep 17 00:00:00 2001 From: Alisa Date: Sun, 6 Oct 2019 13:11:45 +0300 Subject: [PATCH 14/28] =?UTF-8?q?=D0=A0=D0=B5=D1=88=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D0=B7=D0=B0=D0=B4=D0=B0=D1=87=D0=B0=20=D0=BD?= =?UTF-8?q?=D0=BE=D0=BC=D0=B5=D1=80=20=D1=81=D0=B5=D0=BC=D1=8C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hw3-task7.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 hw3-task7.py diff --git a/hw3-task7.py b/hw3-task7.py new file mode 100644 index 0000000..01985ef --- /dev/null +++ b/hw3-task7.py @@ -0,0 +1,9 @@ +#Нарисуйте спираль. +if __name__ == '__main__': + import turtle + turtle.shape('turtle') + t = 0.1 + for i in range(360*5): + turtle.left(5) + turtle.forward(t) + t+=0.01 \ No newline at end of file From 68b15780da3570528d18e67a8ba06ce05ca18414 Mon Sep 17 00:00:00 2001 From: Alisa Date: Sun, 6 Oct 2019 13:17:49 +0300 Subject: [PATCH 15/28] =?UTF-8?q?=D0=A0=D0=B5=D1=88=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D0=B7=D0=B0=D0=B4=D0=B0=D1=87=D0=B0=20=D0=BD?= =?UTF-8?q?=D0=BE=D0=BC=D0=B5=D1=80=20=D0=B2=D0=BE=D1=81=D0=B5=D0=BC=D1=8C?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hw3-task8.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 hw3-task8.py diff --git a/hw3-task8.py b/hw3-task8.py new file mode 100644 index 0000000..071c08b --- /dev/null +++ b/hw3-task8.py @@ -0,0 +1,7 @@ +#Нарисуйте «квадратную» спираль. +if __name__ == '__main__': + import turtle + turtle.shape('turtle') + for i in range(1, 80): + turtle.forward(i*10) + turtle.left(90) \ No newline at end of file From 9198ecc1bf44761e589b1593a84558931f3b8223 Mon Sep 17 00:00:00 2001 From: Alisa Date: Fri, 11 Oct 2019 23:09:57 +0300 Subject: [PATCH 16/28] =?UTF-8?q?=D0=A0=D0=B5=D1=88=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D0=B7=D0=B0=D0=B4=D0=B0=D1=87=D0=B0=20=D0=BD?= =?UTF-8?q?=D0=BE=D0=BC=D0=B5=D1=80=20=D0=B4=D0=B5=D1=81=D1=8F=D1=82=D1=8C?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hw3-task10.py | 14 ++++++++++++++ hw3-task9.py | 12 ++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 hw3-task10.py create mode 100644 hw3-task9.py diff --git a/hw3-task10.py b/hw3-task10.py new file mode 100644 index 0000000..260117e --- /dev/null +++ b/hw3-task10.py @@ -0,0 +1,14 @@ +#Нарисуйте «цветок» из окружностей. Используйте функцию, рисующую окружность. +if __name__ == '__main__': + import turtle + turtle.shape('turtle') + turtle.speed(10) + for j in range(1, 4): + for i in range(360): + turtle.forward(1) + turtle.left(1) + turtle.left(180) + for i in range(360): + turtle.forward(1) + turtle.left(1) + turtle.left(180+60) diff --git a/hw3-task9.py b/hw3-task9.py new file mode 100644 index 0000000..a7995d7 --- /dev/null +++ b/hw3-task9.py @@ -0,0 +1,12 @@ +#Нарисуйте 10 вложенных правильных многоугольников. Используйте функцию, рисующую правильный n-угольник. +if __name__ == '__main__': + import turtle + turtle.shape('turtle') + def prmn(n, dlina): + sumAngle = 180*(n-2) + Angle = sumAngle/n + for i in range(n): + turtle.forward(100) + turtle.left(180 - Angle) + for i in range(3, 11): + prmn(i, 50) \ No newline at end of file From b391aebfcb2e0f45a2c4a20d82843a8c8b0c007c Mon Sep 17 00:00:00 2001 From: Alisa Date: Fri, 11 Oct 2019 23:16:31 +0300 Subject: [PATCH 17/28] =?UTF-8?q?=D0=A0=D0=B5=D1=88=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D0=BD=D0=B5=20=D1=82=D0=B0=D0=BA=20=D0=BA=D0=B0?= =?UTF-8?q?=D0=BA=20=D0=B2=20=D0=BF=D1=80=D0=B8=D0=BC=D0=B5=D1=80=D0=B5=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=B4=D0=B0=D1=87=D0=B0=20=D0=BD=D0=BE=D0=BC=D0=B5?= =?UTF-8?q?=D1=80=20=D0=B4=D0=B5=D0=B2=D1=8F=D1=82=D1=8C.=20=D0=AF=20?= =?UTF-8?q?=D0=BD=D0=B5=20=D0=BF=D0=BE=D0=BD=D1=8F=D0=BB=D0=B0=20=D0=BA?= =?UTF-8?q?=D0=B0=D0=BA=20=D0=B4=D0=B5=D0=BB=D0=B0=D1=82=D1=8C=20=D1=81=20?= =?UTF-8?q?=D0=BE=D0=B1=D1=89=D0=B8=D0=BC=20=D1=80=D0=B0=D0=B4=D0=B8=D1=83?= =?UTF-8?q?=D1=81=D0=BE=D0=BC=20=D0=BE=D0=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=BD?= =?UTF-8?q?=D0=BE=D0=B9=20=D0=BE=D0=BA=D1=80=D1=83=D0=B6=D0=BD=D0=BE=D1=81?= =?UTF-8?q?=D1=82=D0=B8,=20=D1=82=D0=B0=D0=BA=20=D1=87=D1=82=D0=BE=20?= =?UTF-8?q?=D0=B2=D1=8B=D1=88=D0=BB=D0=BE=20=D1=87=D1=82=D0=BE-=D1=82?= =?UTF-8?q?=D0=BE=20=D0=B4=D1=80=D1=83=D0=B3=D0=BE=D0=B5,=20=D0=BD=D0=BE?= =?UTF-8?q?=20=D1=82=D0=B5=D1=85=D0=BD=D0=B8=D1=87=D0=B5=D1=81=D0=BA=D0=B8?= =?UTF-8?q?=20=D1=8D=D1=82=D0=BE=20=D0=B6=D0=B5=20=D0=BC=D0=BD=D0=BE=D0=B3?= =?UTF-8?q?=D0=BE=D1=83=D0=B3=D0=BE=D0=BB=D1=8C=D0=BD=D0=B8=D0=BA=20=D0=B2?= =?UTF-8?q?=20=D0=BC=D0=BD=D0=BE=D0=B3=D0=BE=D1=83=D0=B3=D0=BE=D0=BB=D1=8C?= =?UTF-8?q?=D0=BD=D0=B8=D0=BA=D0=B5...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hw3-task9.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw3-task9.py b/hw3-task9.py index a7995d7..9b770fc 100644 --- a/hw3-task9.py +++ b/hw3-task9.py @@ -2,11 +2,11 @@ if __name__ == '__main__': import turtle turtle.shape('turtle') - def prmn(n, dlina): + def f(n, dlina): sumAngle = 180*(n-2) Angle = sumAngle/n for i in range(n): turtle.forward(100) turtle.left(180 - Angle) for i in range(3, 11): - prmn(i, 50) \ No newline at end of file + f(i, 50) \ No newline at end of file From 1b767252c62a3c908d2beab8e2f9661cbeea2abf Mon Sep 17 00:00:00 2001 From: Alisa Date: Fri, 11 Oct 2019 23:27:40 +0300 Subject: [PATCH 18/28] =?UTF-8?q?=D0=A0=D0=B5=D1=88=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D0=BD=D0=B5=20=D1=82=D0=B0=D0=BA=20=D0=BA=D0=B0?= =?UTF-8?q?=D0=BA=20=D0=B2=20=D0=BF=D1=80=D0=B8=D0=BC=D0=B5=D1=80=D0=B5=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=B4=D0=B0=D1=87=D0=B0=20=D0=BD=D0=BE=D0=BC=D0=B5?= =?UTF-8?q?=D1=80=20=D0=BE=D0=B4=D0=B8=D0=BD=D0=BD=D0=B0=D0=B4=D1=86=D0=B0?= =?UTF-8?q?=D1=82=D1=8C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hw3-task10.py | 1 - hw3-task11.py | 11 +++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 hw3-task11.py diff --git a/hw3-task10.py b/hw3-task10.py index 260117e..80b68a3 100644 --- a/hw3-task10.py +++ b/hw3-task10.py @@ -2,7 +2,6 @@ if __name__ == '__main__': import turtle turtle.shape('turtle') - turtle.speed(10) for j in range(1, 4): for i in range(360): turtle.forward(1) diff --git a/hw3-task11.py b/hw3-task11.py new file mode 100644 index 0000000..95b7535 --- /dev/null +++ b/hw3-task11.py @@ -0,0 +1,11 @@ +#Нарисуйте «бабочку» из окружностей. Используйте функцию, рисующую окружность. +if __name__ == '__main__': + import turtle + turtle.shape('turtle') + for j in range(1, 10): + for i in range(360): + turtle.forward(0.6+j*0.2) + turtle.left(1) + for i in range(360): + turtle.forward(0.6+j*0.2) + turtle.right(1) From 10f75fa6e09f8c3fc452101c4c50e5b8e3ce7008 Mon Sep 17 00:00:00 2001 From: Alisa Date: Fri, 11 Oct 2019 23:28:27 +0300 Subject: [PATCH 19/28] =?UTF-8?q?=D0=A0=D0=B5=D1=88=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D0=B7=D0=B0=D0=B4=D0=B0=D1=87=D0=B0=20=D0=BD?= =?UTF-8?q?=D0=BE=D0=BC=D0=B5=D1=80=20=D0=BE=D0=B4=D0=B8=D0=BD=D0=BD=D0=B0?= =?UTF-8?q?=D0=B4=D1=86=D0=B0=D1=82=D1=8C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hw3-task11.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw3-task11.py b/hw3-task11.py index 95b7535..2dcfa17 100644 --- a/hw3-task11.py +++ b/hw3-task11.py @@ -1,4 +1,4 @@ -#Нарисуйте «бабочку» из окружностей. Используйте функцию, рисующую окружность. +#Нарисуйте «бабочку» из окружностей. Используйте функцию, рисующую окружность if __name__ == '__main__': import turtle turtle.shape('turtle') From e8eabe50a76137899e493a0cd3bdcb624c9df004 Mon Sep 17 00:00:00 2001 From: Alisa Date: Fri, 11 Oct 2019 23:34:58 +0300 Subject: [PATCH 20/28] =?UTF-8?q?=D0=A0=D0=B5=D1=88=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D0=B7=D0=B0=D0=B4=D0=B0=D1=87=D0=B0=20=D0=BD?= =?UTF-8?q?=D0=BE=D0=BC=D0=B5=D1=80=20=D0=B4=D0=B2=D0=B5=D0=BD=D0=B0=D0=B4?= =?UTF-8?q?=D1=86=D0=B0=D1=82=D1=8C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hw3-task12.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 hw3-task12.py diff --git a/hw3-task12.py b/hw3-task12.py new file mode 100644 index 0000000..95c3ef1 --- /dev/null +++ b/hw3-task12.py @@ -0,0 +1,12 @@ +#Нарисуйте пружину. Используйте функцию, рисующую дугу. +if __name__ == '__main__': + import turtle + turtle.shape('turtle') + turtle.left(90) + for j in range(10): + for i in range(180): + turtle.forward(1) + turtle.right(1) + for i in range(180): + turtle.forward(0.25) + turtle.right(1) \ No newline at end of file From 99e370efd2b5848584b44c9cabf258ca3c1dee26 Mon Sep 17 00:00:00 2001 From: Alisa Date: Sat, 12 Oct 2019 00:32:52 +0300 Subject: [PATCH 21/28] =?UTF-8?q?=D0=A0=D0=B5=D1=88=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D0=B7=D0=B0=D0=B4=D0=B0=D1=87=D0=B0=20=D0=BD?= =?UTF-8?q?=D0=BE=D0=BC=D0=B5=D1=80=20=D1=82=D1=80=D0=B8=D0=BD=D0=B0=D0=B4?= =?UTF-8?q?=D1=86=D0=B0=D1=82=D1=8C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hw3-task13.py | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 hw3-task13.py diff --git a/hw3-task13.py b/hw3-task13.py new file mode 100644 index 0000000..69f8610 --- /dev/null +++ b/hw3-task13.py @@ -0,0 +1,48 @@ +#Нарисуйте смайлик с помощью написанных функций рисования круга и дуги +if __name__ == '__main__': + import turtle + turtle.shape('turtle') + turtle.speed(0) + turtle.begin_fill() + turtle.fillcolor("yellow") + for i in range(360): + turtle.forward(1) + turtle.right(1) + turtle.end_fill() + turtle.penup() + turtle.left(90) + turtle.backward(50) + turtle.left(90) + turtle.forward(30) + turtle.pendown() + turtle.begin_fill() + turtle.fillcolor("blue") + for i in range(360): + turtle.forward(0.1) + turtle.right(1) + turtle.end_fill() + turtle.penup() + turtle.backward(60) + turtle.pendown() + turtle.begin_fill() + turtle.fillcolor("blue") + for i in range(360): + turtle.forward(0.1) + turtle.right(1) + turtle.end_fill() + turtle.penup() + turtle.forward(30) + turtle.left(90) + turtle.pendown() + #turtle.pencolor('red') + turtle.pensize(5) + turtle.forward(20) + turtle.penup() + turtle.left(90) + turtle.forward(30) + turtle.right(90) + turtle.pendown() + turtle.pencolor('red') + for i in range(180): + turtle.forward(0.5) + turtle.right(1) \ No newline at end of file From 1b2d6abab899d74e20cc32727b5120b92553ead9 Mon Sep 17 00:00:00 2001 From: Alisa Date: Sat, 12 Oct 2019 15:50:18 +0300 Subject: [PATCH 22/28] =?UTF-8?q?=D0=A1=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB?= =?UTF-8?q?=D0=B0=20=D0=BF=D0=B0=D0=BF=D0=BA=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Hello | 1 - .../task1.py" | 0 .../task2.py" | 0 .../task3.py" | 0 .../task4.py" | 0 .../task5.py" | 0 .../task6.py" | 0 .../__init__.py" | 0 .../hw3-task1.py" | 0 .../hw3-task10.py" | 0 .../hw3-task11.py" | 0 .../hw3-task12.py" | 0 .../hw3-task13.py" | 0 .../hw3-task2.py" | 0 .../hw3-task3.py" | 0 .../hw3-task4.py" | 0 .../hw3-task5.py" | 0 .../hw3-task6.py" | 0 .../hw3-task7.py" | 0 .../hw3-task8.py" | 0 .../hw3-task9.py" | 0 21 files changed, 1 deletion(-) delete mode 100644 Hello rename task1.py => "Week 2_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task1.py" (100%) rename task2.py => "Week 2_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task2.py" (100%) rename task3.py => "Week 2_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task3.py" (100%) rename task4.py => "Week 2_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task4.py" (100%) rename task5.py => "Week 2_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task5.py" (100%) rename task6.py => "Week 2_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task6.py" (100%) create mode 100644 "Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/__init__.py" rename hw3-task1.py => "Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task1.py" (100%) rename hw3-task10.py => "Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task10.py" (100%) rename hw3-task11.py => "Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task11.py" (100%) rename hw3-task12.py => "Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task12.py" (100%) rename hw3-task13.py => "Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task13.py" (100%) rename hw3-task2.py => "Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task2.py" (100%) rename hw3-task3.py => "Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task3.py" (100%) rename hw3-task4.py => "Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task4.py" (100%) rename hw3-task5.py => "Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task5.py" (100%) rename hw3-task6.py => "Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task6.py" (100%) rename hw3-task7.py => "Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task7.py" (100%) rename hw3-task8.py => "Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task8.py" (100%) rename hw3-task9.py => "Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task9.py" (100%) diff --git a/Hello b/Hello deleted file mode 100644 index 1385fe3..0000000 --- a/Hello +++ /dev/null @@ -1 +0,0 @@ -print("Hello, world!") \ No newline at end of file diff --git a/task1.py "b/Week 2_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task1.py" similarity index 100% rename from task1.py rename to "Week 2_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task1.py" diff --git a/task2.py "b/Week 2_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task2.py" similarity index 100% rename from task2.py rename to "Week 2_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task2.py" diff --git a/task3.py "b/Week 2_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task3.py" similarity index 100% rename from task3.py rename to "Week 2_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task3.py" diff --git a/task4.py "b/Week 2_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task4.py" similarity index 100% rename from task4.py rename to "Week 2_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task4.py" diff --git a/task5.py "b/Week 2_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task5.py" similarity index 100% rename from task5.py rename to "Week 2_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task5.py" diff --git a/task6.py "b/Week 2_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task6.py" similarity index 100% rename from task6.py rename to "Week 2_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task6.py" diff --git "a/Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/__init__.py" "b/Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/__init__.py" new file mode 100644 index 0000000..e69de29 diff --git a/hw3-task1.py "b/Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task1.py" similarity index 100% rename from hw3-task1.py rename to "Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task1.py" diff --git a/hw3-task10.py "b/Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task10.py" similarity index 100% rename from hw3-task10.py rename to "Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task10.py" diff --git a/hw3-task11.py "b/Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task11.py" similarity index 100% rename from hw3-task11.py rename to "Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task11.py" diff --git a/hw3-task12.py "b/Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task12.py" similarity index 100% rename from hw3-task12.py rename to "Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task12.py" diff --git a/hw3-task13.py "b/Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task13.py" similarity index 100% rename from hw3-task13.py rename to "Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task13.py" diff --git a/hw3-task2.py "b/Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task2.py" similarity index 100% rename from hw3-task2.py rename to "Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task2.py" diff --git a/hw3-task3.py "b/Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task3.py" similarity index 100% rename from hw3-task3.py rename to "Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task3.py" diff --git a/hw3-task4.py "b/Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task4.py" similarity index 100% rename from hw3-task4.py rename to "Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task4.py" diff --git a/hw3-task5.py "b/Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task5.py" similarity index 100% rename from hw3-task5.py rename to "Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task5.py" diff --git a/hw3-task6.py "b/Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task6.py" similarity index 100% rename from hw3-task6.py rename to "Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task6.py" diff --git a/hw3-task7.py "b/Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task7.py" similarity index 100% rename from hw3-task7.py rename to "Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task7.py" diff --git a/hw3-task8.py "b/Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task8.py" similarity index 100% rename from hw3-task8.py rename to "Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task8.py" diff --git a/hw3-task9.py "b/Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task9.py" similarity index 100% rename from hw3-task9.py rename to "Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task9.py" From d2fec5f9d8bfe0c6e21d58c953b003aa6628d940 Mon Sep 17 00:00:00 2001 From: Alisa Date: Sun, 13 Oct 2019 19:11:30 +0300 Subject: [PATCH 23/28] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B2=D0=BE=D0=B5=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=B4=D0=B0=D0=BD=D0=B8=D0=B5,=20=D1=81=D0=BA?= =?UTF-8?q?=D0=BE=D0=BF=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BB=D0=B0=20=D0=B8?= =?UTF-8?q?=D0=B7=20=D0=BF=D0=B8=D1=82=D0=BE=D0=BD=D1=82=D1=8C=D1=8E=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=B0,=20=D0=B3=D0=B4=D0=B5=20=D0=B2=D1=81=D0=B5?= =?UTF-8?q?=20=D1=82=D0=B5=D1=81=D1=82=D1=8B=20=D0=BF=D1=80=D0=BE=D1=88?= =?UTF-8?q?=D0=BB=D0=B8=D1=81=D1=8C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hw3-task10.py" | 24 +++++++++---------- .../__init__.py" | 0 .../task1.py" | 10 ++++++++ 3 files changed, 22 insertions(+), 12 deletions(-) create mode 100644 "Week 4_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/__init__.py" create mode 100644 "Week 4_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task1.py" diff --git "a/Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task10.py" "b/Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task10.py" index 80b68a3..cf202ab 100644 --- "a/Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task10.py" +++ "b/Week 3_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/hw3-task10.py" @@ -1,13 +1,13 @@ #Нарисуйте «цветок» из окружностей. Используйте функцию, рисующую окружность. -if __name__ == '__main__': - import turtle - turtle.shape('turtle') - for j in range(1, 4): - for i in range(360): - turtle.forward(1) - turtle.left(1) - turtle.left(180) - for i in range(360): - turtle.forward(1) - turtle.left(1) - turtle.left(180+60) + +import turtle +turtle.shape('turtle') +for j in range(1, 4): + for i in range(360): + turtle.forward(1) + turtle.left(1) + turtle.left(180) + for i in range(360): + turtle.forward(1) + turtle.left(1) + turtle.left(180+60) diff --git "a/Week 4_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/__init__.py" "b/Week 4_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/__init__.py" new file mode 100644 index 0000000..e69de29 diff --git "a/Week 4_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task1.py" "b/Week 4_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task1.py" new file mode 100644 index 0000000..4f1b15b --- /dev/null +++ "b/Week 4_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task1.py" @@ -0,0 +1,10 @@ +a = list(map(int, input().split())) +index = 1 +bigneighbor = 0 +while index < len(a)-1: + if a[index-1] < a[index] > a[index+1]: + bigneighbor += 1 + index += 2 + else: + index += 1 +print(bigneighbor) \ No newline at end of file From a5e66a28f865894b17b1987f1e4eb2c5c0a7ea10 Mon Sep 17 00:00:00 2001 From: Alisa Date: Sun, 13 Oct 2019 19:13:33 +0300 Subject: [PATCH 24/28] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B2=D0=BE=D0=B5=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=B4=D0=B0=D0=BD=D0=B8=D0=B5,=20=D1=81=D0=BA?= =?UTF-8?q?=D0=BE=D0=BF=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BB=D0=B0=20=D0=B8?= =?UTF-8?q?=D0=B7=20=D0=BF=D0=B8=D1=82=D0=BE=D0=BD=D1=82=D1=8C=D1=8E=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=B0,=20=D0=B3=D0=B4=D0=B5=20=D0=B2=D1=81=D0=B5?= =?UTF-8?q?=20=D1=82=D0=B5=D1=81=D1=82=D1=8B=20=D0=BF=D1=80=D0=BE=D1=88?= =?UTF-8?q?=D0=BB=D0=B8=D1=81=D1=8C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../task1.py" | 2 ++ 1 file changed, 2 insertions(+) diff --git "a/Week 4_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task1.py" "b/Week 4_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task1.py" index 4f1b15b..3bf3ce4 100644 --- "a/Week 4_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task1.py" +++ "b/Week 4_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task1.py" @@ -1,3 +1,5 @@ +#Дан список чисел. Определите, сколько в этом списке элементов, которые больше двух своих соседей, и выведите количество таких элементов. +#Крайние элементы списка никогда не учитываются, поскольку у них недостаточно соседей. a = list(map(int, input().split())) index = 1 bigneighbor = 0 From 4352b4f28a8b09233a65dc2f0f18c7be480fa412 Mon Sep 17 00:00:00 2001 From: Alisa Date: Sun, 13 Oct 2019 19:21:55 +0300 Subject: [PATCH 25/28] =?UTF-8?q?=D0=92=D1=82=D0=BE=D1=80=D0=BE=D0=B5=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=B4=D0=B0=D0=BD=D0=B8=D0=B5,=20=D1=81=D0=BA?= =?UTF-8?q?=D0=BE=D0=BF=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BB=D0=B0=20=D0=B8?= =?UTF-8?q?=D0=B7=20=D0=BF=D0=B8=D1=82=D0=BE=D0=BD=D1=82=D1=8C=D1=8E=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=B0,=20=D0=B3=D0=B4=D0=B5=20=D0=B2=D1=81=D0=B5?= =?UTF-8?q?=20=D1=82=D0=B5=D1=81=D1=82=D1=8B=20=D0=BF=D1=80=D0=BE=D1=88?= =?UTF-8?q?=D0=BB=D0=B8=D1=81=D1=8C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../task2.py" | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 "Week 4_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task2.py" diff --git "a/Week 4_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task2.py" "b/Week 4_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task2.py" new file mode 100644 index 0000000..8f35c63 --- /dev/null +++ "b/Week 4_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task2.py" @@ -0,0 +1,8 @@ +#В списке все элементы различны. Поменяйте местами минимальный и максимальный элемент этого списка. +a = list(map(int, input().split())) +b = list(a) +b[a.index(min(a))] = max(a) +b[a.index(max(a))] = min(a) + +for i in range(len(b)): + print(b[i]) \ No newline at end of file From 325b5378d851adc8d49ed1e71b34b0f02949397f Mon Sep 17 00:00:00 2001 From: Alisa Date: Sun, 13 Oct 2019 19:39:10 +0300 Subject: [PATCH 26/28] =?UTF-8?q?=D0=A2=D1=80=D0=B5=D1=82=D1=8C=D0=B5=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=B4=D0=B0=D0=BD=D0=B8=D0=B5,=20=D1=81=D0=BA?= =?UTF-8?q?=D0=BE=D0=BF=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BB=D0=B0=20=D0=B8?= =?UTF-8?q?=D0=B7=20=D0=BF=D0=B8=D1=82=D0=BE=D0=BD=D1=82=D1=8C=D1=8E=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=B0,=20=D0=B3=D0=B4=D0=B5=20=D0=B2=D1=81=D0=B5?= =?UTF-8?q?=20=D1=82=D0=B5=D1=81=D1=82=D1=8B=20=D0=BF=D1=80=D0=BE=D1=88?= =?UTF-8?q?=D0=BB=D0=B8=D1=81=D1=8C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../task3.py" | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 "Week 4_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task3.py" diff --git "a/Week 4_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task3.py" "b/Week 4_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task3.py" new file mode 100644 index 0000000..e67adb1 --- /dev/null +++ "b/Week 4_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task3.py" @@ -0,0 +1,4 @@ +#Дан список чисел. Посчитайте, сколько в нем пар элементов, равных друг другу. +#Считается, что любые два элемента, равные друг другу образуют одну пару, которую необходимо посчитать. +a = list(map(int, input().split())) +print(sum(a.count(x) - 1 for x in a) // 2) \ No newline at end of file From 774a1146dbaa27d575a033bac1d5715b9b219d71 Mon Sep 17 00:00:00 2001 From: Alisa Date: Sun, 13 Oct 2019 19:46:46 +0300 Subject: [PATCH 27/28] =?UTF-8?q?=D0=A7=D0=B5=D1=82=D0=B2=D1=91=D1=80?= =?UTF-8?q?=D1=82=D0=BE=D0=B5=20=D0=B7=D0=B0=D0=B4=D0=B0=D0=BD=D0=B8=D0=B5?= =?UTF-8?q?,=20=D1=81=D0=BA=D0=BE=D0=BF=D0=B8=D1=80=D0=BE=D0=B2=D0=B0?= =?UTF-8?q?=D0=BB=D0=B0=20=D0=B8=D0=B7=20=D0=BF=D0=B8=D1=82=D0=BE=D0=BD?= =?UTF-8?q?=D1=82=D1=8C=D1=8E=D1=82=D0=BE=D1=80=D0=B0,=20=D0=B3=D0=B4?= =?UTF-8?q?=D0=B5=20=D0=B2=D1=81=D0=B5=20=D1=82=D0=B5=D1=81=D1=82=D1=8B=20?= =?UTF-8?q?=D0=BF=D1=80=D0=BE=D1=88=D0=BB=D0=B8=D1=81=D1=8C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../task4.py" | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 "Week 4_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task4.py" diff --git "a/Week 4_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task4.py" "b/Week 4_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task4.py" new file mode 100644 index 0000000..5f188e7 --- /dev/null +++ "b/Week 4_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task4.py" @@ -0,0 +1,6 @@ +#Дан список. Выведите те его элементы, которые встречаются в списке только один раз. +#Элементы нужно выводить в том порядке, в котором они встречаются в списке. +a = list(map(int, input().split())) +for i in a: + if a.count(i)==1: + print(i) \ No newline at end of file From fc8a7155de34c1b8696790511a5ae765a3c8377c Mon Sep 17 00:00:00 2001 From: Alisa Date: Sun, 13 Oct 2019 20:22:46 +0300 Subject: [PATCH 28/28] =?UTF-8?q?=D0=9F=D1=8F=D1=82=D0=BE=D0=B5=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=B4=D0=B0=D0=BD=D0=B8=D0=B5,=20=D1=81=D0=BA=D0=BE?= =?UTF-8?q?=D0=BF=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BB=D0=B0=20=D0=B8=D0=B7?= =?UTF-8?q?=20=D0=BF=D0=B8=D1=82=D0=BE=D0=BD=D1=82=D1=8C=D1=8E=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=B0,=20=D0=B3=D0=B4=D0=B5=20=D0=B2=D1=81=D0=B5=20?= =?UTF-8?q?=D1=82=D0=B5=D1=81=D1=82=D1=8B=20=D0=BF=D1=80=D0=BE=D1=88=D0=BB?= =?UTF-8?q?=D0=B8=D1=81=D1=8C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../task5.py" | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 "Week 4_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task5.py" diff --git "a/Week 4_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task5.py" "b/Week 4_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task5.py" new file mode 100644 index 0000000..f4fc6e4 --- /dev/null +++ "b/Week 4_\320\220\320\273\320\270\321\201\320\260 \320\221\321\203\321\200\320\276\320\262\320\260_\320\22106-907/task5.py" @@ -0,0 +1,5 @@ +#Даны два списка чисел. +#Найдите все числа, которые входят как в первый, так и во второй список и выведите их в порядке возрастания. +a = list(set([int(i) for i in input().split()]) & set([int(i) for i in input().split()])) +for element in sorted(a): + print(element, end=' ') \ No newline at end of file