diff --git a/Programme1 b/Programme1 new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Programme1 @@ -0,0 +1 @@ + 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 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 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) 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 b0: + 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 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 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]