From 392f6d32a22130324e39ee9f833146b33489a230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B3=D0=BE=D1=80?= Date: Sat, 7 Sep 2019 16:55:57 +0300 Subject: [PATCH 1/8] hello --- hello.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 hello.py diff --git a/hello.py b/hello.py new file mode 100644 index 0000000..e75154b --- /dev/null +++ b/hello.py @@ -0,0 +1 @@ +print("hello world") \ No newline at end of file From 0d8c08796c1dd56f6083bb3dd897d62d46173b39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B3=D0=BE=D1=80?= Date: Sat, 7 Sep 2019 16:58:00 +0300 Subject: [PATCH 2/8] hello+6 --- hello.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hello.py b/hello.py index e75154b..ec5cc90 100644 --- a/hello.py +++ b/hello.py @@ -1 +1,2 @@ -print("hello world") \ No newline at end of file +print("hello world") +print(2*3) \ No newline at end of file From eac96dd422da5ade162fdc8b1a47cbf812a65f1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B3=D0=BE=D1=80?= Date: Sat, 7 Sep 2019 17:03:44 +0300 Subject: [PATCH 3/8] hello+6 --- hello.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hello.py b/hello.py index ec5cc90..05ae3a4 100644 --- a/hello.py +++ b/hello.py @@ -1,2 +1,3 @@ print("hello world") -print(2*3) \ No newline at end of file +print(2*3) +#jdsflkdfhkfd \ No newline at end of file From 79333d4570fdaa511c18b53a82ec4e03c290102e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B3=D0=BE=D1=80?= Date: Sat, 14 Sep 2019 13:48:40 +0300 Subject: [PATCH 4/8] hell+6+comm --- hello.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello.py b/hello.py index 05ae3a4..f7753be 100644 --- a/hello.py +++ b/hello.py @@ -1,3 +1,3 @@ print("hello world") print(2*3) -#jdsflkdfhkfd \ No newline at end of file +#jdsflkdfhkfddlgkl \ No newline at end of file From 96900e12d6f93929cf546bb0acecda5850cb8a56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B3=D0=BE=D1=80?= Date: Sat, 21 Sep 2019 15:28:54 +0300 Subject: [PATCH 5/8] =?UTF-8?q?=D0=B2=D1=81=D0=B5=20=D0=B7=D0=B0=D0=B4?= =?UTF-8?q?=D0=B0=D1=87=D0=BA=D0=B8=20=D0=B8=D0=B7=202=20=D0=BD=D0=B5?= =?UTF-8?q?=D0=B4=D0=B5=D0=BB=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1.py | 2 ++ 2.py | 3 +++ 3.py | 4 ++++ 4.py | 7 +++++++ 5.py | 7 +++++++ 6.py | 8 ++++++++ 7.py | 7 +++++++ 8.py | 7 +++++++ 9.py | 10 ++++++++++ 9 files changed, 55 insertions(+) create mode 100644 1.py create mode 100644 2.py create mode 100644 3.py create mode 100644 4.py create mode 100644 5.py create mode 100644 6.py create mode 100644 7.py create mode 100644 8.py create mode 100644 9.py diff --git a/1.py b/1.py new file mode 100644 index 0000000..d85a1aa --- /dev/null +++ b/1.py @@ -0,0 +1,2 @@ +n = int(input()) +print((n // 60) % 24, n % 60) diff --git a/2.py b/2.py new file mode 100644 index 0000000..8007a6b --- /dev/null +++ b/2.py @@ -0,0 +1,3 @@ +n = int(input()) +text = str(input()) +print('Hello', (text + ', ')*(n - 1), text) diff --git a/3.py b/3.py new file mode 100644 index 0000000..5e49135 --- /dev/null +++ b/3.py @@ -0,0 +1,4 @@ +a = [] +for i in range(3): + a.append(int(input())) +print(min(a)) \ No newline at end of file diff --git a/4.py b/4.py new file mode 100644 index 0000000..73948f7 --- /dev/null +++ b/4.py @@ -0,0 +1,7 @@ +distance = 109 +speed = int(input()) +time = int(input()) +if speed > 0: + print((speed * time) % distance) +else: + print(distance - (abs(speed * time) % distance)) diff --git a/5.py b/5.py new file mode 100644 index 0000000..e0569ac --- /dev/null +++ b/5.py @@ -0,0 +1,7 @@ +import math +n = int(input()) +k = 0 +while n != 0: + k += math.factorial(n) + n -= 1 +print(k) \ No newline at end of file diff --git a/6.py b/6.py new file mode 100644 index 0000000..e2aa304 --- /dev/null +++ b/6.py @@ -0,0 +1,8 @@ +a = [] +x = int(input()) +while x != 0: + a.append(x) + x = int(input()) +mx = max(a) +a.remove(mx) +print(max(a)) \ No newline at end of file diff --git a/7.py b/7.py new file mode 100644 index 0000000..38ff68e --- /dev/null +++ b/7.py @@ -0,0 +1,7 @@ +a = [] +n = int(input()) +for i in range(n): + a.append(int(input())) +for i in range(n): + if i % 2 == 0: + print(a[i]) diff --git a/8.py b/8.py new file mode 100644 index 0000000..d7f7ecf --- /dev/null +++ b/8.py @@ -0,0 +1,7 @@ +a = [] +n = int(input()) +for i in range(n): + a.append(int(input())) +for i in range(n): + if a[i] % 2 == 0: + print(a[i]) diff --git a/9.py b/9.py new file mode 100644 index 0000000..36ef66a --- /dev/null +++ b/9.py @@ -0,0 +1,10 @@ +def distance(a, b, c, d): + dist = ((a - b)**2 + (c - d)**2)**0.5 + print(dist) + + +x1 = float(input()) +x2 = float(input()) +y1 = float(input()) +y2 = float(input()) +distance(x1, x2, y1, y2) \ No newline at end of file From 9481d50f02469158c9050dfddc9490cc740f7382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B3=D0=BE=D1=80?= Date: Sun, 6 Oct 2019 00:04:07 +0300 Subject: [PATCH 6/8] =?UTF-8?q?=D1=82=D1=83=D1=82=20=D0=B2=D1=81=D0=B5=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=B4=D0=B0=D1=87=D0=BA=D0=B8=20=D0=B8=D0=B7=203?= =?UTF-8?q?=20=D0=BD=D0=B5=D0=B4=D0=B5=D0=BB=D0=B8=20=D0=B7=D0=B0=20=D0=B8?= =?UTF-8?q?=D1=81=D0=BA=D0=BB=D1=8E=D1=87=D0=B5=D0=BD=D0=B8=D0=B5=D0=BC=20?= =?UTF-8?q?=D0=BF=D0=BE=D1=81=D0=BB=D0=B5=D0=B4=D0=BD=D0=B5=D0=B9=20=D0=B8?= =?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=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- S.py | 12 +++++++++++ babachka.py | 21 +++++++++++++++++++ dugi.py | 15 +++++++++++++ hypot.py | 4 ++++ krugi.py | 14 +++++++++++++ kvadratnayaspiral.py | 15 +++++++++++++ smile.py | 50 ++++++++++++++++++++++++++++++++++++++++++++ spiral.py | 19 +++++++++++++++++ turtle1.py | 7 +++++++ turtle2.py | 6 ++++++ turtle3.py | 22 +++++++++++++++++++ turtle4.py | 10 +++++++++ 12 files changed, 195 insertions(+) create mode 100644 S.py create mode 100644 babachka.py create mode 100644 dugi.py create mode 100644 hypot.py create mode 100644 krugi.py create mode 100644 kvadratnayaspiral.py create mode 100644 smile.py create mode 100644 spiral.py create mode 100644 turtle1.py create mode 100644 turtle2.py create mode 100644 turtle3.py create mode 100644 turtle4.py diff --git a/S.py b/S.py new file mode 100644 index 0000000..a814054 --- /dev/null +++ b/S.py @@ -0,0 +1,12 @@ +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 diff --git a/babachka.py b/babachka.py new file mode 100644 index 0000000..e96caba --- /dev/null +++ b/babachka.py @@ -0,0 +1,21 @@ +import turtle as t + + +def krug(n, k): + t.right(n) + for i in range(360): + t.forward(k) + t.right(1) + + +t.speed(0) +t.right(90) +p = 10 +r = 1 +gradus = 0 +while p != 0: + gradus %= 360 + krug(gradus, r) + krug(180 - gradus, r) + r += 0.1 + p -= 1 \ No newline at end of file diff --git a/dugi.py b/dugi.py new file mode 100644 index 0000000..e1c8567 --- /dev/null +++ b/dugi.py @@ -0,0 +1,15 @@ +import turtle as t + + +def duga(n): + for i in range(180): + t.forward(n) + t.right(1) + + +t.left(90) +k = 10 +while k != 0: + duga(1) + duga(0.1) + k -= 1 \ No newline at end of file diff --git a/hypot.py b/hypot.py new file mode 100644 index 0000000..038f75f --- /dev/null +++ b/hypot.py @@ -0,0 +1,4 @@ +a = 179 +b = 197 +c = (a ** 2 + b ** 2) ** 0.5 +print (c) \ No newline at end of file diff --git a/krugi.py b/krugi.py new file mode 100644 index 0000000..a96f6b4 --- /dev/null +++ b/krugi.py @@ -0,0 +1,14 @@ +import turtle as t + + +def krug(n): + t.right(n) + for i in range(360): + t.forward(1) + t.right(1) + + +k = 0 +while k != 360: + krug(k) + k += 30 \ No newline at end of file diff --git a/kvadratnayaspiral.py b/kvadratnayaspiral.py new file mode 100644 index 0000000..31d23b8 --- /dev/null +++ b/kvadratnayaspiral.py @@ -0,0 +1,15 @@ +import turtle as t + + +def polukvadrat(nach, kon): + while nach != kon: + t.forward(nach) + t.left(90) + t.forward(nach) + t.left(90) + nach += 4 + + +x = 5 +y = 150 +polukvadrat(x, y) \ No newline at end of file diff --git a/smile.py b/smile.py new file mode 100644 index 0000000..6a50cf8 --- /dev/null +++ b/smile.py @@ -0,0 +1,50 @@ +import turtle as t + + +def duga(n): + for i in range(180): + t.forward(n) + t.right(1) + + +def krug(n): + for i in range(360): + t.forward(n) + t.left(1) + + +t.speed(0) +t.color('yellow') +t.begin_fill() +krug(3) +t.end_fill() +t.penup() +t.left(90) +t.forward(250) +t.left(90) +t.forward(70) +t.pendown() +t.color('blue') +t.begin_fill() +krug(0.3) +t.end_fill() +t.penup() +t.right(180) +t.forward(140) +t.pendown() +t.right(180) +t.begin_fill() +krug(0.3) +t.end_fill() +t.penup() +t.forward(70) +t.left(90) +t.forward(70) +t.pendown() +t.forward(70) +t.penup() +t.left(90) +t.forward(60) +t.pendown() +t.right(90) +duga(1) \ No newline at end of file diff --git a/spiral.py b/spiral.py new file mode 100644 index 0000000..8a94dc7 --- /dev/null +++ b/spiral.py @@ -0,0 +1,19 @@ +import turtle as t + + +def krug(n): + for i in range(180): + t.forward(n) + t.right(1) + + +def duga(x, y): + while x != y: + krug(x) + x += 0.1 + + +t.speed(0) +x = 1 +y = 10 +duga(x, y) \ No newline at end of file diff --git a/turtle1.py b/turtle1.py new file mode 100644 index 0000000..8d7abf7 --- /dev/null +++ b/turtle1.py @@ -0,0 +1,7 @@ +import turtle as t +n = 4 +while n > 0: + t.forward(200) + t.left(90) + n -= 1 + diff --git a/turtle2.py b/turtle2.py new file mode 100644 index 0000000..ae2bcad --- /dev/null +++ b/turtle2.py @@ -0,0 +1,6 @@ +import turtle as t +n = 720 +while n != 0: + t.forward(0.5) + t.right(0.5) + n -= 1 diff --git a/turtle3.py b/turtle3.py new file mode 100644 index 0000000..32dfed3 --- /dev/null +++ b/turtle3.py @@ -0,0 +1,22 @@ +import turtle as t +n = 10 +k = 4 +side = 10 +while n > 0: + while k > 0: + t.forward(side) + t.left(90) + k -= 1 + k = 4 + t.penup() + t.right(90) + t.forward(4) + t.right(90) + t.forward(4) + t.right(180) + t.pendown() + side += 8 + n -= 1 + + + diff --git a/turtle4.py b/turtle4.py new file mode 100644 index 0000000..42806b5 --- /dev/null +++ b/turtle4.py @@ -0,0 +1,10 @@ +import turtle as t +n = int(input()) +k = n +t.left(90) +while n > 0: + t.forward(100) + t.stamp() + t.goto(0.00, 0.00) + t.right(360/k) + n -= 1 \ No newline at end of file From 8a4089dcdd6ce8aab09b87686f13ccd380817ccc Mon Sep 17 00:00:00 2001 From: egorishe151201 <55024234+egorishe151201@users.noreply.github.com> Date: Sun, 6 Oct 2019 00:06:09 +0300 Subject: [PATCH 7/8] =?UTF-8?q?Create=20=D1=84=D0=B0=D0=BC=D0=B8=D0=BB?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=B8=D0=BC=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...274\320\270\320\273\320\270\321\217 \320\270\320\274\321\217" | 1 + 1 file changed, 1 insertion(+) create mode 100644 "\321\204\320\260\320\274\320\270\320\273\320\270\321\217 \320\270\320\274\321\217" diff --git "a/\321\204\320\260\320\274\320\270\320\273\320\270\321\217 \320\270\320\274\321\217" "b/\321\204\320\260\320\274\320\270\320\273\320\270\321\217 \320\270\320\274\321\217" new file mode 100644 index 0000000..0a2a446 --- /dev/null +++ "b/\321\204\320\260\320\274\320\270\320\273\320\270\321\217 \320\270\320\274\321\217" @@ -0,0 +1 @@ +Самохвалов Егор From 949e4a34290425ab01c42aeace372b472f454704 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B3=D0=BE=D1=80?= Date: Mon, 21 Oct 2019 23:59:55 +0300 Subject: [PATCH 8/8] =?UTF-8?q?7=20=D0=B7=D0=B0=D0=B4=D0=B0=D1=87=20=D0=B8?= =?UTF-8?q?=D0=B7=204=20=D0=BD=D0=B5=D0=B4=D0=B5=D0=BB=D0=B8=20=D0=A1?= =?UTF-8?q?=D0=B0=D0=BC=D0=BE=D1=85=D0=B2=D0=B0=D0=BB=D0=BE=D0=B2=20=D0=95?= =?UTF-8?q?=D0=B3=D0=BE=D1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- week4-1.py | 9 +++++++++ week4-2.py | 15 +++++++++++++++ week4-3.py | 10 ++++++++++ week4-4.py | 14 ++++++++++++++ week4-5.py | 12 ++++++++++++ week4-6.py | 14 ++++++++++++++ week4-7.py | 11 +++++++++++ 7 files changed, 85 insertions(+) create mode 100644 week4-1.py create mode 100644 week4-2.py create mode 100644 week4-3.py create mode 100644 week4-4.py create mode 100644 week4-5.py create mode 100644 week4-6.py create mode 100644 week4-7.py diff --git a/week4-1.py b/week4-1.py new file mode 100644 index 0000000..223985a --- /dev/null +++ b/week4-1.py @@ -0,0 +1,9 @@ +a = [] +count = 0 +n = int(input()) +for i in range(n): + a.append(int(input())) +for i in range(2, n): + if a[i-1] > a[i - 2] and a[i - 1] > a[i]: + count += 1 +print(count) diff --git a/week4-2.py b/week4-2.py new file mode 100644 index 0000000..5b450ea --- /dev/null +++ b/week4-2.py @@ -0,0 +1,15 @@ +a = [] +a1 = 0 +a2 = 0 +n = int(input()) +for i in range(n): + a.append(int(input())) +b = max(a) +c = min(a) +for i in range(n): + if a[i] == b: + a1 = i + if a[i] == c: + a2 = i +a[a1], a[a2] = a[a2], a[a1] +print(a) \ No newline at end of file diff --git a/week4-3.py b/week4-3.py new file mode 100644 index 0000000..b544bd9 --- /dev/null +++ b/week4-3.py @@ -0,0 +1,10 @@ +a = [] +count = 0 +n = int(input()) +for i in range(n): + a.append(int(input())) +for i in range(n - 1): + for j in range(i + 1, n): + if a[i] == a[j]: + count += 1 +print(count) \ No newline at end of file diff --git a/week4-4.py b/week4-4.py new file mode 100644 index 0000000..1cd3be2 --- /dev/null +++ b/week4-4.py @@ -0,0 +1,14 @@ +a = [] +b = [] +n = int(input()) +for i in range(n): + a.append(int(input())) +for i in range(n): + b.append(a.count(a[i])) +for i in range(n): + if b[i] > 1: + c = a[i] + while b[i] > 0: + a.remove(c) + b[i] -= 1 +print(a) \ No newline at end of file diff --git a/week4-5.py b/week4-5.py new file mode 100644 index 0000000..ad4a831 --- /dev/null +++ b/week4-5.py @@ -0,0 +1,12 @@ +a = [] +b = [] +n = int(input()) +for i in range(n): + a.append(int(input())) + b.append(int(input())) +a = set(a) +b = set(b) +print(a, b) +c = set.intersection(a, b) +с = list(c) +print(c) \ No newline at end of file diff --git a/week4-6.py b/week4-6.py new file mode 100644 index 0000000..4f6fd90 --- /dev/null +++ b/week4-6.py @@ -0,0 +1,14 @@ +string = str(input()) +spisok = list(string) +c = set() +print(spisok) +while spisok.count(' ') != 0: + spisok.remove(' ') +for i in range(len(spisok)): + if spisok[i] in c: + print('yes') + else: + c.add(spisok[i]) + print('no') +print(c) +print(spisok) diff --git a/week4-7.py b/week4-7.py new file mode 100644 index 0000000..c37be4b --- /dev/null +++ b/week4-7.py @@ -0,0 +1,11 @@ +a = [] +counts = int(input()) +for i in range(counts): + string_with_words = input() + b = string_with_words.split() + a = a + b +a = list(set(a)) +t = len(a) +print(t) + +