From 2d077026d65e94fb6a95f8f5bc5aa227c75b3c34 Mon Sep 17 00:00:00 2001 From: PavelTin <32041233+PavelTin@users.noreply.github.com> Date: Sat, 21 Sep 2019 13:44:20 +0300 Subject: [PATCH 01/13] Create Programme1 --- Programme1 | 1 + 1 file changed, 1 insertion(+) create mode 100644 Programme1 diff --git a/Programme1 b/Programme1 new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Programme1 @@ -0,0 +1 @@ + From 44538cedee88db8f6180c57748c01d75d76d27f2 Mon Sep 17 00:00:00 2001 From: PavelTin Date: Sat, 21 Sep 2019 15:40:17 +0300 Subject: [PATCH 02/13] =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B2=D1=8B=D0=B9=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=BC=D0=BC=D0=B8=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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..5ffd7af --- /dev/null +++ b/hello.py @@ -0,0 +1 @@ +print('hello, world') \ No newline at end of file From 99837d3052582ef74a160fb1e9dcc2d76241c293 Mon Sep 17 00:00:00 2001 From: PavelTin Date: Sat, 5 Oct 2019 22:15:59 +0300 Subject: [PATCH 03/13] Py1 --- week02/Py1.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 week02/Py1.py diff --git a/week02/Py1.py b/week02/Py1.py new file mode 100644 index 0000000..15d875e --- /dev/null +++ b/week02/Py1.py @@ -0,0 +1,5 @@ +def print_hours_minutes(n): + print(n//60%24,n%60) + +n=int(input()) +print_hours_minutes(n) \ No newline at end of file From c141ecd403599be35011656767fae17c6856b1a0 Mon Sep 17 00:00:00 2001 From: PavelTin Date: Sat, 5 Oct 2019 22:32:31 +0300 Subject: [PATCH 04/13] Py2 --- week02/Py2.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 week02/Py2.py diff --git a/week02/Py2.py b/week02/Py2.py new file mode 100644 index 0000000..b72bccc --- /dev/null +++ b/week02/Py2.py @@ -0,0 +1,10 @@ +def print_string(t,n): + a=[] + a.append('Hello') + for i in range(n): + a.append(t) + print(', '.join([a[i] for i in range(n+1)])) + +text=input() +n=int(input()) +print_string(text,n) From 1e4f3c1e512eb099d18a49767cf89ce4f13ab52c Mon Sep 17 00:00:00 2001 From: PavelTin Date: Sat, 5 Oct 2019 23:17:49 +0300 Subject: [PATCH 05/13] Py3 --- week02/Py3.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 week02/Py3.py diff --git a/week02/Py3.py b/week02/Py3.py new file mode 100644 index 0000000..7a5d411 --- /dev/null +++ b/week02/Py3.py @@ -0,0 +1,11 @@ +def find_min(a,b,c): + min =a + if b Date: Sat, 5 Oct 2019 23:26:12 +0300 Subject: [PATCH 06/13] Py4 --- week02/Py4.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 week02/Py4.py diff --git a/week02/Py4.py b/week02/Py4.py new file mode 100644 index 0000000..544f533 --- /dev/null +++ b/week02/Py4.py @@ -0,0 +1,8 @@ +def point(v,t): + if v>0: + print(v*t%109) + else: + print((109+v*t)%109) +v=int(input()) +t=int(input()) +point(v,t) \ No newline at end of file From 69397a9898f5b7b411ad2080f8ed7b42050d1c2e Mon Sep 17 00:00:00 2001 From: PavelTin Date: Sat, 5 Oct 2019 23:36:35 +0300 Subject: [PATCH 07/13] Py5 --- week02/Py5.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 week02/Py5.py diff --git a/week02/Py5.py b/week02/Py5.py new file mode 100644 index 0000000..6c60213 --- /dev/null +++ b/week02/Py5.py @@ -0,0 +1,10 @@ +def sum_factorials(n): + a=1 + sum=0 + for i in range(1,n+1): + a=a*i + sum+=a + print(sum) + +n=int(input()) +sum_factorials(n) \ No newline at end of file From 1e84d5a6cdd81cfd08fb9784ecbdf70fc9dd5688 Mon Sep 17 00:00:00 2001 From: PavelTin Date: Sat, 5 Oct 2019 23:37:18 +0300 Subject: [PATCH 08/13] =?UTF-8?q?Py5=20=D0=B1=D0=B5=D0=B7=20)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- week02/Py5.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/week02/Py5.py b/week02/Py5.py index 6c60213..05e5025 100644 --- a/week02/Py5.py +++ b/week02/Py5.py @@ -7,4 +7,4 @@ def sum_factorials(n): print(sum) n=int(input()) -sum_factorials(n) \ No newline at end of file +sum_factorials(n \ No newline at end of file From 1d8604af4fa4f1aac58ff7e930009ccfaf4fb329 Mon Sep 17 00:00:00 2001 From: PavelTin Date: Sat, 5 Oct 2019 23:37:34 +0300 Subject: [PATCH 09/13] Py5 final --- week02/Py5.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/week02/Py5.py b/week02/Py5.py index 05e5025..6c60213 100644 --- a/week02/Py5.py +++ b/week02/Py5.py @@ -7,4 +7,4 @@ def sum_factorials(n): print(sum) n=int(input()) -sum_factorials(n \ No newline at end of file +sum_factorials(n) \ No newline at end of file From 7874aeaa19c82244183f6634d483591870db396b Mon Sep 17 00:00:00 2001 From: PavelTin Date: Sat, 5 Oct 2019 23:45:30 +0300 Subject: [PATCH 10/13] Py6 --- week02/Py6.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 week02/Py6.py diff --git a/week02/Py6.py b/week02/Py6.py new file mode 100644 index 0000000..c45d20e --- /dev/null +++ b/week02/Py6.py @@ -0,0 +1,17 @@ +def find_2nd_max(arr): + max=arr[0] + for i in range(1,len(arr)): + if arr[i]>max: + max=arr[i] + max2=0 + for i in range(len(arr)): + if ((arr[i]>max2) and (arr[i] Date: Sat, 5 Oct 2019 23:53:51 +0300 Subject: [PATCH 11/13] Py7 --- week02/Py7.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 week02/Py7.py diff --git a/week02/Py7.py b/week02/Py7.py new file mode 100644 index 0000000..ff0cb24 --- /dev/null +++ b/week02/Py7.py @@ -0,0 +1,6 @@ +def even_index(a): + evenindex=a[::2] + print(' '.join([str(elem) for elem in evenindex])) + +a=input().split() +even_index(a) \ No newline at end of file From 6496637d629590619c577589b113407f400fa950 Mon Sep 17 00:00:00 2001 From: PavelTin Date: Sun, 6 Oct 2019 00:01:54 +0300 Subject: [PATCH 12/13] Py8 --- week02/Py8.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 week02/Py8.py diff --git a/week02/Py8.py b/week02/Py8.py new file mode 100644 index 0000000..d098136 --- /dev/null +++ b/week02/Py8.py @@ -0,0 +1,7 @@ +def even_elems(lst): + for elem in lst: + if int(elem) %2==0: + print(elem,end=' ') + +arr=input().split() +even_elems(arr) From c45961d5fca73db2afff0bac769d39f65b16014b Mon Sep 17 00:00:00 2001 From: PavelTin Date: Sun, 6 Oct 2019 00:22:03 +0300 Subject: [PATCH 13/13] Py9 --- week02/Py9.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 week02/Py9.py diff --git a/week02/Py9.py b/week02/Py9.py new file mode 100644 index 0000000..ab53275 --- /dev/null +++ b/week02/Py9.py @@ -0,0 +1,10 @@ +from math import sqrt + +def length(a,b,c,d): + print(sqrt((a-c)**2+(b-d)**2)) + +x1=float(input()) +y1=float(input()) +x2=float(input()) +y2=float(input()) +length(x1,y1,x2,y2) \ No newline at end of file