From 3ab0aceab54e11d4caf2a11f6b3738fc26b802e7 Mon Sep 17 00:00:00 2001 From: rinxqzwen Date: Thu, 2 Oct 2025 16:13:55 +0000 Subject: [PATCH 1/5] my first commit --- lec_my_first_prgrm.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 lec_my_first_prgrm.py diff --git a/lec_my_first_prgrm.py b/lec_my_first_prgrm.py new file mode 100644 index 000000000..9cf52cf0d --- /dev/null +++ b/lec_my_first_prgrm.py @@ -0,0 +1 @@ +print ("Hello world!") \ No newline at end of file From c9ab4285c4f0ad824da0ecb5277a6619b3f3e42b Mon Sep 17 00:00:00 2001 From: rinxqzwen Date: Thu, 16 Oct 2025 16:51:32 +0000 Subject: [PATCH 2/5] uyvk --- lec_bool.py | 13 +++++++++++++ lec_if.py | 10 ++++++++++ lec_if_elif_else.py | 7 +++++++ lec_if_else.py | 5 +++++ lec_logic_operation.py | 10 ++++++++++ task1.py | 5 +++++ 6 files changed, 50 insertions(+) create mode 100644 lec_bool.py create mode 100644 lec_if.py create mode 100644 lec_if_elif_else.py create mode 100644 lec_if_else.py create mode 100644 lec_logic_operation.py create mode 100644 task1.py diff --git a/lec_bool.py b/lec_bool.py new file mode 100644 index 000000000..61cebb753 --- /dev/null +++ b/lec_bool.py @@ -0,0 +1,13 @@ +print (bool(2)) + +print (bool("Good")) + +print (bool([1, 4 , 5])) + +print (bool(0)) + +print(bool('')) + +print(bool([])) + +print(bool([[]])) \ No newline at end of file diff --git a/lec_if.py b/lec_if.py new file mode 100644 index 000000000..fc1c6ef1b --- /dev/null +++ b/lec_if.py @@ -0,0 +1,10 @@ +if 1 : + print("Hello 1") + +a = 3 +if a > 1 : + print(f'Hello {a}') + +b = 5 +if b == 5: + print(f'hello {b}') \ No newline at end of file diff --git a/lec_if_elif_else.py b/lec_if_elif_else.py new file mode 100644 index 000000000..1cfbe7f2a --- /dev/null +++ b/lec_if_elif_else.py @@ -0,0 +1,7 @@ +a = 3 +if a>5: + print("hello 5") +elif a<2: + print("hello 2") +else: + print("tupo hello") \ No newline at end of file diff --git a/lec_if_else.py b/lec_if_else.py new file mode 100644 index 000000000..0c81711bd --- /dev/null +++ b/lec_if_else.py @@ -0,0 +1,5 @@ +a = 3 +if a > 4: + print ("Hello 4") +else: + print(f"Hello {a}") \ No newline at end of file diff --git a/lec_logic_operation.py b/lec_logic_operation.py new file mode 100644 index 000000000..60e251e17 --- /dev/null +++ b/lec_logic_operation.py @@ -0,0 +1,10 @@ +a = 3 +b = 4 +c = 5 + +if a > 4 and b == 2: + print("Good") +elif b > 3 or c == 5: + print("Best") +else: + print("Bad") \ No newline at end of file diff --git a/task1.py b/task1.py new file mode 100644 index 000000000..684294390 --- /dev/null +++ b/task1.py @@ -0,0 +1,5 @@ +a = input() +if a / 2: + print("четное") +else: + print("нечетное") \ No newline at end of file From 197fbc1af6151c470601864f2294a3434c870828 Mon Sep 17 00:00:00 2001 From: rinxqzwen Date: Thu, 23 Oct 2025 16:46:31 +0000 Subject: [PATCH 3/5] 251023 --- dop1.py | 12 ++++++++++++ lec_break_and_continue.py | 9 +++++++++ lec_for.py | 9 +++++++++ lec_range.py | 11 +++++++++++ lec_while.py | 4 ++++ task1.py | 4 ++-- task2.py | 5 +++++ task3.py | 5 +++++ task4.py | 8 ++++++++ task5.py | 10 ++++++++++ task6.py | 12 ++++++++++++ 11 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 dop1.py create mode 100644 lec_break_and_continue.py create mode 100644 lec_for.py create mode 100644 lec_range.py create mode 100644 lec_while.py create mode 100644 task2.py create mode 100644 task3.py create mode 100644 task4.py create mode 100644 task5.py create mode 100644 task6.py diff --git a/dop1.py b/dop1.py new file mode 100644 index 000000000..b7b7cac11 --- /dev/null +++ b/dop1.py @@ -0,0 +1,12 @@ +a = int(input()) +b = int (input()) +c = int(input()) +D = b**2 - 4*a*c +if D < 0: + print('уравнение не имеет решения') +elif D== 0: + print('уравнение имеет один код', int(( -b + D**0.5) / (2*a))) +else: + print('уравнение имеет два корня:') + print(((-b+ D**0.5) / (2*a))) + print(((-b -D**0.5) / (2*a))) \ No newline at end of file diff --git a/lec_break_and_continue.py b/lec_break_and_continue.py new file mode 100644 index 000000000..1bfdb70ec --- /dev/null +++ b/lec_break_and_continue.py @@ -0,0 +1,9 @@ +for symbol in 'Hello world': + if symbol == 'o': + break + print(symbol) + +for symbol in 'Hello world': + if symbol =='o' or symbol== 'l': + continue + print(symbol) \ No newline at end of file diff --git a/lec_for.py b/lec_for.py new file mode 100644 index 000000000..af2c47fe8 --- /dev/null +++ b/lec_for.py @@ -0,0 +1,9 @@ +for i in 1, 3, 4: + print(i**2, end=' ') +for i in 1, 3, 4: + print(i**2, end='\n') +for i in 1, 3, 4: + print( i, i**2, sep=' - ') +a =[1, 5, 7, 10] +for i in a: + print(f'{i}**3 = {i**3}') \ No newline at end of file diff --git a/lec_range.py b/lec_range.py new file mode 100644 index 000000000..9836a070a --- /dev/null +++ b/lec_range.py @@ -0,0 +1,11 @@ +a = range (0, 10, 2) +print(a) +print(type(a)) +print(a[3]) + +a ='Good' +for i in range(0, 10, 1): + if i < len(a): + print(a[i] + ' - Bad') + else: + print(f'{i}' + ' - Good') diff --git a/lec_while.py b/lec_while.py new file mode 100644 index 000000000..5351f4a28 --- /dev/null +++ b/lec_while.py @@ -0,0 +1,4 @@ +i = 5 +while i < 15 : + print('i:', i) + i += 2 diff --git a/task1.py b/task1.py index 684294390..5f25b3a96 100644 --- a/task1.py +++ b/task1.py @@ -1,5 +1,5 @@ -a = input() -if a / 2: +a = int(input()) +if a % 2 == 0: print("четное") else: print("нечетное") \ No newline at end of file diff --git a/task2.py b/task2.py new file mode 100644 index 000000000..ba758e9ab --- /dev/null +++ b/task2.py @@ -0,0 +1,5 @@ +a = int(input('первый член прогрессии: ')) +b = int(input('знаменатель прогрессии: ')) +c = int(input('количество членов прогрессии: ')) +for i in range(1, c + 1): + print(f'член {i} = {a * b**(i -1)}') \ No newline at end of file diff --git a/task3.py b/task3.py new file mode 100644 index 000000000..ed2693ec7 --- /dev/null +++ b/task3.py @@ -0,0 +1,5 @@ +year = int(input()) +if year % 4 == 0: + print(f'{year} високосный') +else: + print(f'{year} невисокосный') \ No newline at end of file diff --git a/task4.py b/task4.py new file mode 100644 index 000000000..340ae1b66 --- /dev/null +++ b/task4.py @@ -0,0 +1,8 @@ +a = int(input('число: ')) +b = [1] +for i in range(1, a+1): + if i ==1: + b.append(i) + else: + b.append(b[i-2]+b[i -1]) + print(b) diff --git a/task5.py b/task5.py new file mode 100644 index 000000000..e04fd32e2 --- /dev/null +++ b/task5.py @@ -0,0 +1,10 @@ +a = int(input()) +b = int(input()) +if a % b == 0: + print('первое число делится на второе') + print(f'остаток {a%b}') + print(f'a/b = {int(a/b)}') +else: + print('первое число не делится на второе') + print(f'остаток{a%b}') + print( f'a/b = {int(a/b)}') diff --git a/task6.py b/task6.py new file mode 100644 index 000000000..b0208a907 --- /dev/null +++ b/task6.py @@ -0,0 +1,12 @@ +a = 1 +b = 2 +c = 3 +d = 4 +e = 5 +f = 6 +g = 7 +h = 8 +i = 9 +for i in range (1, 10): + print(a*i, b*i, c*i, d*i, e*i, f*i, g*i, h*i,) + From 120421c717818d79aeea0682a4f3faaa560c286f Mon Sep 17 00:00:00 2001 From: rinxqzwen Date: Thu, 13 Nov 2025 16:49:07 +0000 Subject: [PATCH 4/5] thegh --- lec_3_my_module.py | 0 lec_dop1.py | 0 lec_slice.py | 20 ++++++++++++++++++++ lec_task1.py | 13 +++++++++++++ lec_task2.py | 17 +++++++++++++++++ lec_task3.py | 25 +++++++++++++++++++++++++ lec_task5.py | 0 lec_task6.py | 11 +++++++++++ 8 files changed, 86 insertions(+) create mode 100644 lec_3_my_module.py create mode 100644 lec_dop1.py create mode 100644 lec_slice.py create mode 100644 lec_task1.py create mode 100644 lec_task2.py create mode 100644 lec_task3.py create mode 100644 lec_task5.py create mode 100644 lec_task6.py diff --git a/lec_3_my_module.py b/lec_3_my_module.py new file mode 100644 index 000000000..e69de29bb diff --git a/lec_dop1.py b/lec_dop1.py new file mode 100644 index 000000000..e69de29bb diff --git a/lec_slice.py b/lec_slice.py new file mode 100644 index 000000000..227dd1def --- /dev/null +++ b/lec_slice.py @@ -0,0 +1,20 @@ +import numpy as np + +a =[1, 5, 3, 6] +slice= a[0:2:1] +print(slice) + +slice = a[3: 0 :-1] +print(slice) + +slice = a[ : :-1] +print(slice) + +b = np.array([a, np.array(a)*3]) +print(b) + +slice = b[::, 1] +print(slice) + +slice = b[1,2:3:1] +print(slice) \ No newline at end of file diff --git a/lec_task1.py b/lec_task1.py new file mode 100644 index 000000000..28a428707 --- /dev/null +++ b/lec_task1.py @@ -0,0 +1,13 @@ +G = 6.67 * 10** (-1) +c = 3 * 10**8 +g = 9.81 +k = 1.38 * 10**(-23) +Na = 6.02 * 10**23 +R = 8.31 +p = 101325 +Vo = 2.24 * 10**(-2) +F = 9.4 * 10**4 +mp = 1.67 * 10**(-27) +k = 1.38 * 10**(-23) +e = 1.6 * 10**(-19) +h = 1.054 * 10**(-34) \ No newline at end of file diff --git a/lec_task2.py b/lec_task2.py new file mode 100644 index 000000000..852f76d61 --- /dev/null +++ b/lec_task2.py @@ -0,0 +1,17 @@ +import numpy as np +from math import cos, tan, radians, sqrt +h = 100 +a = radians(45) +b = radians(35) +g = 9.81 +V = sqrt((g * h * np.tan(np.radians(35))**2/ (2 * np.cos(np.radians(45))**2 *( 1 - np.tan(np.radians(35)) * np.tan(np.radians(45))))))**0.5 +print(V) + +import numpy as np +T = 200 +E = 300 +k = 1.38 * 10**(-23) +e = 1.6 * 10**(-19) +h = 1.054 * 10**(-34) +N = (2 / np.sqrt(np.pi)) * np.sqrt(h *(k * 200)**3) * np.exp(-300 / (k * 200)) +print(N) \ No newline at end of file diff --git a/lec_task3.py b/lec_task3.py new file mode 100644 index 000000000..8b7b9d7ae --- /dev/null +++ b/lec_task3.py @@ -0,0 +1,25 @@ +import numpy as np +g = 9.81 +x_0 = 0 +y_0 = 0 +v_0 = 15 +alpha = 45 * np.pi /180 +vx_0= v_0 * np.cos(alpha) +vy_0 = v_0 * np.sin(alpha) + +time= [] +x_coords = [] +y_coords = [] + +for t in np.arange(0, 5, 0.01): + x = x_0 + vx_0 * t + y = y_0 + vy_0 * t - g*t**2 /2 + + time.append(t) + x_coords.append(x) + y_coords.append(y) +print(t) +print(x) +print (y) + + diff --git a/lec_task5.py b/lec_task5.py new file mode 100644 index 000000000..e69de29bb diff --git a/lec_task6.py b/lec_task6.py new file mode 100644 index 000000000..57b9963e4 --- /dev/null +++ b/lec_task6.py @@ -0,0 +1,11 @@ +import numpy as np +a = np.array[[2, 3, 1, 4, 5, 6, 7], + [8, 1, 3, 2, 2, 6, 8], + [1, 4, 3, 1, 0, 2, 5], + [4, 5, 0, 1, 3, 2, 1], + [8, 7, 9, 1, 0, 2, 3] ] +slice = a[0:3:1,0:2:1 ] +print(slice) +slice = a[1:3, 3:5:1] +print(slice) +slice = a[] \ No newline at end of file From b23a62186cd1424cde827fbaa001af77b81642d1 Mon Sep 17 00:00:00 2001 From: rinxqzwen Date: Thu, 13 Nov 2025 16:50:46 +0000 Subject: [PATCH 5/5] efff --- lec_task6.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lec_task6.py b/lec_task6.py index 57b9963e4..30bb52136 100644 --- a/lec_task6.py +++ b/lec_task6.py @@ -1,11 +1,10 @@ import numpy as np -a = np.array[[2, 3, 1, 4, 5, 6, 7], +a = np.array([[2, 3, 1, 4, 5, 6, 7], [8, 1, 3, 2, 2, 6, 8], [1, 4, 3, 1, 0, 2, 5], [4, 5, 0, 1, 3, 2, 1], - [8, 7, 9, 1, 0, 2, 3] ] + [8, 7, 9, 1, 0, 2, 3] ]) slice = a[0:3:1,0:2:1 ] print(slice) slice = a[1:3, 3:5:1] print(slice) -slice = a[] \ No newline at end of file