From 7f8c813c0d6b5695a7b251f15b933c6a5f4c848d Mon Sep 17 00:00:00 2001 From: Romazio101 Date: Wed, 18 Sep 2024 15:39:03 +0000 Subject: [PATCH 1/9] =?UTF-8?q?=D0=A1=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20?= =?UTF-8?q?=D1=81=D0=B2=D0=BE=D1=8E=20=D0=BF=D0=B5=D1=80=D0=B2=D1=83=D1=8E?= =?UTF-8?q?=20=D0=BF=D1=80=D0=BE=D0=B3=D1=80=D0=B0=D0=BC=D0=BC=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hello.py | 1 + helo pie | 0 2 files changed, 1 insertion(+) create mode 100644 hello.py create mode 100644 helo pie diff --git a/hello.py b/hello.py new file mode 100644 index 000000000..75d9766db --- /dev/null +++ b/hello.py @@ -0,0 +1 @@ +print('hello world') diff --git a/helo pie b/helo pie new file mode 100644 index 000000000..e69de29bb From 1a8b6acd11e5f4e3b41221853dff96045fca3178 Mon Sep 17 00:00:00 2001 From: Romazio101 Date: Wed, 18 Sep 2024 15:50:57 +0000 Subject: [PATCH 2/9] =?UTF-8?q?=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D0=BB=20?= =?UTF-8?q?=D0=B2=D0=B5=D1=82=D0=BA=D1=83=20=D0=B4=D0=BB=D1=8F=20=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D0=B2=D0=BE=D0=B3=D0=BE=20=D0=B7=D0=B0=D0=BD=D1=8F?= =?UTF-8?q?=D1=82=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lec_print.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 lec_print.py diff --git a/lec_print.py b/lec_print.py new file mode 100644 index 000000000..b4a78bd89 --- /dev/null +++ b/lec_print.py @@ -0,0 +1 @@ +print('Fire in the holl') \ No newline at end of file From f49f682fc0d571805939ed28ae1e8fe5b46565e0 Mon Sep 17 00:00:00 2001 From: Romazio101 Date: Wed, 25 Sep 2024 16:06:56 +0000 Subject: [PATCH 3/9] =?UTF-8?q?=D0=A1=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20?= =?UTF-8?q?=D0=BE=D0=B4=D0=BD=D0=BE=20=D0=B7=D0=B0=D0=B4=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lec_data_type.py | 23 +++++++++++++++++++++++ lec_input.py | 9 +++++++++ lec_list.py | 17 +++++++++++++++++ lec_math_operation.py | 13 +++++++++++++ lec_obj_and_reference.py | 7 +++++++ lec_print.py | 12 +++++++++++- lec_string.py | 14 ++++++++++++++ task_1.py | 10 ++++++++++ 8 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 lec_data_type.py create mode 100644 lec_input.py create mode 100644 lec_list.py create mode 100644 lec_math_operation.py create mode 100644 lec_obj_and_reference.py create mode 100644 lec_string.py create mode 100644 task_1.py diff --git a/lec_data_type.py b/lec_data_type.py new file mode 100644 index 000000000..8432f8f34 --- /dev/null +++ b/lec_data_type.py @@ -0,0 +1,23 @@ +type + +type(3) + +print(type(3)) + +print(type(3.4)) + +print(type('Молодец')) + +a = 'Molodec' +print(type(a)) + +a= ['Molodec', 1, 'Курто', 6, 8] +print(type(a)) + +print(type(True)) + +print(type(False)) + +print(type(None)) + +print(print()) \ No newline at end of file diff --git a/lec_input.py b/lec_input.py new file mode 100644 index 000000000..19332dee2 --- /dev/null +++ b/lec_input.py @@ -0,0 +1,9 @@ +a = input() +print(a) + +a = input('Введите значение a: ') +print(a) +print(type(a)) + +a = int('Введите значение a: ') +print(type(a)) \ No newline at end of file diff --git a/lec_list.py b/lec_list.py new file mode 100644 index 000000000..509974ab4 --- /dev/null +++ b/lec_list.py @@ -0,0 +1,17 @@ +a = [1, 3, 6] +print (a[0]) + +b = [8, 10, 11] + +c = a + b +print(c) + +print(c * 2) + +c.append('Good') +print(c) + +a.append(b) +print(a) + +print(len(a)) \ No newline at end of file diff --git a/lec_math_operation.py b/lec_math_operation.py new file mode 100644 index 000000000..1eb149a2a --- /dev/null +++ b/lec_math_operation.py @@ -0,0 +1,13 @@ +print(3+4) + +print(4-3) + +print(3*4) + +print(4**3) + +print(4/3) + +print(4//3) + +print(4%3) \ No newline at end of file diff --git a/lec_obj_and_reference.py b/lec_obj_and_reference.py new file mode 100644 index 000000000..52799bb49 --- /dev/null +++ b/lec_obj_and_reference.py @@ -0,0 +1,7 @@ +s = 3 + 4 + +memory_id = id(s) +print(s, memory_id) + +s = 5 +print(s) \ No newline at end of file diff --git a/lec_print.py b/lec_print.py index b4a78bd89..1003b0435 100644 --- a/lec_print.py +++ b/lec_print.py @@ -1 +1,11 @@ -print('Fire in the holl') \ No newline at end of file +print('Fire in the holl') + +print + +print() + +print(3) + +print(3+4) + +print(3, 4) \ No newline at end of file diff --git a/lec_string.py b/lec_string.py new file mode 100644 index 000000000..8f63e9645 --- /dev/null +++ b/lec_string.py @@ -0,0 +1,14 @@ +a = 'Good' +b = 'Bad' + +print(a + b) + +print(a - b) + +print(a * 3) + +c = 50 +d = 10 +print(f'Вставим числа{c} и {d}') + +print (len(a)) diff --git a/task_1.py b/task_1.py new file mode 100644 index 000000000..dc463f0ec --- /dev/null +++ b/task_1.py @@ -0,0 +1,10 @@ +print('Hello, World!') + +print('Маша + Петя = Любовь') + +print('x = 3 + 4') + +a = 3 +b = 4 +x = a + b +print('x'=3+4) \ No newline at end of file From cf96e3bc0cb7f6017219b2c12c3439ff0decca93 Mon Sep 17 00:00:00 2001 From: Romazio101 Date: Wed, 25 Sep 2024 16:10:04 +0000 Subject: [PATCH 4/9] =?UTF-8?q?=D0=A1=D0=B2=D0=B5=D1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- task_1.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/task_1.py b/task_1.py index dc463f0ec..bc0ea9378 100644 --- a/task_1.py +++ b/task_1.py @@ -6,5 +6,4 @@ a = 3 b = 4 -x = a + b -print('x'=3+4) \ No newline at end of file +x = a + b \ No newline at end of file From 2513123ef66b4042047468a7de3b292692d48c5e Mon Sep 17 00:00:00 2001 From: Romazio101 Date: Tue, 1 Oct 2024 16:01:31 +0000 Subject: [PATCH 5/9] =?UTF-8?q?=D0=A1=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20?= =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B2=D0=BE=D0=B5=20=D0=B7=D0=B0=D0=B4=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- task_1.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/task_1.py b/task_1.py index bc0ea9378..9e2cccaca 100644 --- a/task_1.py +++ b/task_1.py @@ -2,8 +2,6 @@ print('Маша + Петя = Любовь') -print('x = 3 + 4') +print('x = 3+4') -a = 3 -b = 4 -x = a + b \ No newline at end of file +print('x =7') \ No newline at end of file From c67da93bece7891c54782adb8c902eb70016f415 Mon Sep 17 00:00:00 2001 From: Romazio101 Date: Tue, 1 Oct 2024 18:32:10 +0000 Subject: [PATCH 6/9] =?UTF-8?q?=D0=A1=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20?= =?UTF-8?q?=D0=B4=D0=BE=D0=BC=D0=B0=D1=88=D0=BD=D0=B5=D0=B5=20=D0=B7=D0=B0?= =?UTF-8?q?=D0=B4=D0=B0=D0=BD=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- task_2.py | 16 ++++++++++++++++ task_3.py | 11 +++++++++++ task_4.py | 13 +++++++++++++ task_5.py | 17 +++++++++++++++++ task_6.py | 13 +++++++++++++ 5 files changed, 70 insertions(+) create mode 100644 task_2.py create mode 100644 task_3.py create mode 100644 task_4.py create mode 100644 task_5.py create mode 100644 task_6.py diff --git a/task_2.py b/task_2.py new file mode 100644 index 000000000..dbfe087fe --- /dev/null +++ b/task_2.py @@ -0,0 +1,16 @@ +x = ('Hello, World!') + +print(type(x)) + +x = (3+4) + +print(type(x)) + +x = ( 3 / 4) + +print(type(x)) + +x = ([1, 2, 5, 10, 100]) + +print(type(x)) + \ No newline at end of file diff --git a/task_3.py b/task_3.py new file mode 100644 index 000000000..fa662f1ec --- /dev/null +++ b/task_3.py @@ -0,0 +1,11 @@ +from math import * + +x = 3 + +y1 = (sqrt(x**3) / (x**3 + 3 / x)) * (4 * x**7 - x**5) + 80 * sqrt(27 * x**4 + 12* x**3 - 5 * x**2 + 10) + +print(y1) + +y2 = (3 % 2 + 16.7 * 4.32 // 1) / (14.5 + 31 % 12 - x**3.4 // 1) + +print(y2) \ No newline at end of file diff --git a/task_4.py b/task_4.py new file mode 100644 index 000000000..8b3256216 --- /dev/null +++ b/task_4.py @@ -0,0 +1,13 @@ +a = [1, 5, 'Good', 'Bad'] + +b = [9, 'Blue', 'Red', 11] + +print(a[1] + b[3]) + +print(a[2] + b[2]) + +print(a[0] * b[0]) + +print(a[1] ** b[3]) + +print(a + b) \ No newline at end of file diff --git a/task_5.py b/task_5.py new file mode 100644 index 000000000..5afd5995f --- /dev/null +++ b/task_5.py @@ -0,0 +1,17 @@ +text = 'Шляпка гриба, покрытая … кожиц..й, держится на … ножк.. . Снизу шляпка затянута … плёнкой. Когда её уберёшь, откроется нижняя … сторона шляпк.. .' + +word1 = input('Введите слово') + +word2 = input('Введите букву') + +word3 = input('Введите слово') + +word4 = input('Введите букву') + +word5 = input('Введите слово') + +word6 = input('Введите слово') + +word7 = input('Введите букву') + +print(f'Шляпка гриба, покрытая {word1} кожиц{word2}й, держится на {word3} ножк{word4} . Снизу шляпка затянута {word5} плёнкой. Когда её уберёшь, откроется нижняя {word6} сторона шляпк{word7} .') \ No newline at end of file diff --git a/task_6.py b/task_6.py new file mode 100644 index 000000000..788300ade --- /dev/null +++ b/task_6.py @@ -0,0 +1,13 @@ +l = [] + +l.append(int(input('Введите возраст'))) + +l.append(input('введите пол')) + +l.append(input('введите имя')) + +l.append(input('Введите город')) + +l.append(int(input('Введите класс'))) + +print(l) \ No newline at end of file From 370690a3ed617bb9543c5736afbcd6556dc7568f Mon Sep 17 00:00:00 2001 From: Romazio101 Date: Wed, 9 Oct 2024 13:33:00 +0000 Subject: [PATCH 7/9] =?UTF-8?q?=D0=A1=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20?= =?UTF-8?q?=D0=B4=D0=BE=D0=BC=D0=B0=D1=88=D0=BD=D0=B5=D0=B5=20=D0=B7=D0=B0?= =?UTF-8?q?=D0=B4=D0=B0=D0=BD=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lab2_task1.py | 6 ++++++ lab2_task2.py | 7 +++++++ lab2_task3.py | 6 ++++++ lab2_task4.py | 10 ++++++++++ lab2_task5.py | 12 ++++++++++++ lab2_task6.py | 4 ++++ 6 files changed, 45 insertions(+) create mode 100644 lab2_task1.py create mode 100644 lab2_task2.py create mode 100644 lab2_task3.py create mode 100644 lab2_task4.py create mode 100644 lab2_task5.py create mode 100644 lab2_task6.py diff --git a/lab2_task1.py b/lab2_task1.py new file mode 100644 index 000000000..223dbb6fe --- /dev/null +++ b/lab2_task1.py @@ -0,0 +1,6 @@ +a = int(input()) + +if a % 2 == 1: + print("Нечётное") +else: + print("Чётное") \ No newline at end of file diff --git a/lab2_task2.py b/lab2_task2.py new file mode 100644 index 000000000..c2768599a --- /dev/null +++ b/lab2_task2.py @@ -0,0 +1,7 @@ +a = float(input()) +b = float(input()) +c = int(input()) + +for i in range(c): + print(a) + a = a*b \ No newline at end of file diff --git a/lab2_task3.py b/lab2_task3.py new file mode 100644 index 000000000..677e3666b --- /dev/null +++ b/lab2_task3.py @@ -0,0 +1,6 @@ +a = int(input()) + +if a % 400 == 0 or (a % 4 == 0 and a % 100 != 0): + print(f"{a} - високосный год") +else: + print(f"{a} - невисокосный год") \ No newline at end of file diff --git a/lab2_task4.py b/lab2_task4.py new file mode 100644 index 000000000..5942a55c2 --- /dev/null +++ b/lab2_task4.py @@ -0,0 +1,10 @@ +a = int(input()) +f = 0 +p = 1 + +for i in range(a): + c = f + p + print(c, end=" ") + p = f + f = c +print() \ No newline at end of file diff --git a/lab2_task5.py b/lab2_task5.py new file mode 100644 index 000000000..483dd9408 --- /dev/null +++ b/lab2_task5.py @@ -0,0 +1,12 @@ +a = int(input()) +b = int(input()) + +if b == 0: + print("Делить на 0 нельзя") +elif a % b == 0: + print(f"{a} делится на {b}") + print("Частное = ", a / b) +else: + print(f"{a} не делится на {b}") + print("Остаток = ", a % b) + print("Частное = ", a / b) \ No newline at end of file diff --git a/lab2_task6.py b/lab2_task6.py new file mode 100644 index 000000000..76a778342 --- /dev/null +++ b/lab2_task6.py @@ -0,0 +1,4 @@ +for i in range(1, 10): + for k in range(1, 10): + print(i*k, end=" ") + print() \ No newline at end of file From 63df8cd84c73a86f6eb87dafab2a33dd09927951 Mon Sep 17 00:00:00 2001 From: Romazio101 Date: Wed, 9 Oct 2024 16:55:02 +0000 Subject: [PATCH 8/9] =?UTF-8?q?=D0=A1=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=202=20?= =?UTF-8?q?=D0=BB=D0=B0=D0=B1=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lab2_extra1.py | 17 +++++++++++++++++ lec_breakandcontinue.py | 9 +++++++++ lec_for.py | 12 ++++++++++++ lec_generator_range.py | 14 ++++++++++++++ lec_while.py | 4 ++++ 5 files changed, 56 insertions(+) create mode 100644 lab2_extra1.py create mode 100644 lec_breakandcontinue.py create mode 100644 lec_for.py create mode 100644 lec_generator_range.py create mode 100644 lec_while.py diff --git a/lab2_extra1.py b/lab2_extra1.py new file mode 100644 index 000000000..2ac76bca2 --- /dev/null +++ b/lab2_extra1.py @@ -0,0 +1,17 @@ +a = int(input()) +b = int(input()) +c = int(input()) + +D = b**2 - 4*a*c +if D > 0: + x1 = b * - 1 + (D** 0.5) / (2 * a) + x2 = b * - 1 - (D ** 0.5) / (2 *a) + print(x1) + print(x2) +elif D == 0: + x1 = -b / 2 * a + print(x1) +elif D < 0: + print('Нет решения') + + diff --git a/lec_breakandcontinue.py b/lec_breakandcontinue.py new file mode 100644 index 000000000..9716771a4 --- /dev/null +++ b/lec_breakandcontinue.py @@ -0,0 +1,9 @@ +for symbol in 'hello world': + if symbol == 'o': + break + print(symbol) + +for symbol in 'hello world': + if symbol == 'o': + 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..f109164e0 --- /dev/null +++ b/lec_for.py @@ -0,0 +1,12 @@ +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}') diff --git a/lec_generator_range.py b/lec_generator_range.py new file mode 100644 index 000000000..fb8dc0830 --- /dev/null +++ b/lec_generator_range.py @@ -0,0 +1,14 @@ +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') + + + \ No newline at end of file diff --git a/lec_while.py b/lec_while.py new file mode 100644 index 000000000..0278547e0 --- /dev/null +++ b/lec_while.py @@ -0,0 +1,4 @@ +i = 5 +while i < 15: + print('i: ', i) + i += 2 \ No newline at end of file From 07d869ffdfc60a56f5c4c9aa7ca998511b377ea7 Mon Sep 17 00:00:00 2001 From: Romazio101 Date: Wed, 23 Oct 2024 16:30:17 +0000 Subject: [PATCH 9/9] =?UTF-8?q?=D0=A1=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20?= =?UTF-8?q?=D1=82=D1=80=D0=B5=D1=82=D1=8C=D1=8E=20=D0=BB=D0=B0=D0=B1=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- __pycache__/lab3_task1.cpython-312.pyc | Bin 0 -> 416 bytes lab3_task1.py | 12 ++++++++++++ lab3_task2.py | 15 +++++++++++++++ lab3_task3.py | 16 ++++++++++++++++ lab3_task4.py | 15 +++++++++++++++ 5 files changed, 58 insertions(+) create mode 100644 __pycache__/lab3_task1.cpython-312.pyc create mode 100644 lab3_task1.py create mode 100644 lab3_task2.py create mode 100644 lab3_task3.py create mode 100644 lab3_task4.py diff --git a/__pycache__/lab3_task1.cpython-312.pyc b/__pycache__/lab3_task1.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2aa00527b83b604df16aec3ae06a72e01b4eefe0 GIT binary patch literal 416 zcmX@j%ge<81Um#I(-|2V7#@Q-FaYF(!Dka7HJu@aA&Mb|F^VyTDT*nDIf^-jC5k15 zHHtNbEs8CLJ&HYrBZ?!1Gm0~XD~c)5uhxE*Fk#4U2tPbfCx-KEV6*(Q!K~BiKy3jE_ z;qnTB`S`YS!ZCKE+w%0fJxCq3qMVsTa50v7?W>tr6v}Y zWW?tt78lUQ$gk}rbHm^mw1aQEcX^;_ARE2 zl9ddfL00}!)i2L4$}TQQOinGq6 Ta6$yg0&8IvZDcAE02%`TRI7pE literal 0 HcmV?d00001 diff --git a/lab3_task1.py b/lab3_task1.py new file mode 100644 index 000000000..fc5813f48 --- /dev/null +++ b/lab3_task1.py @@ -0,0 +1,12 @@ +G = 6,67 * 10**(-11) +c = 3 * 10**8 +earth_mass = 5.974 * 10**24 +sigma_steff_bolc = 5.67 * 10 ** (-8) +g = 9.8 +e = 2.718281828459045 +pi = 3.141592653589793238 +ae = 149.6 * 10**6 +Na = 6.02 * 10**23 +Vm = 22.4 * 10**(-3) +k = 1.38 * 10**(-23) +ht = 1.05 * 10**(-34) \ No newline at end of file diff --git a/lab3_task2.py b/lab3_task2.py new file mode 100644 index 000000000..39b9277f5 --- /dev/null +++ b/lab3_task2.py @@ -0,0 +1,15 @@ +import lab3_task1 as const +import numpy as np + +h = 100 +a = const.pi / 3 +b = const.pi / 6 +v = np.sqrt((const.g * h * np.tan(b)**2)/(2 * np.cos(a)**2 * (1 - np.tan(b) * np.tan(a)))) +print(v) + +T = 200 +E = 300 +from lab3_task1 import k +from lab3_task1 import ht +N = (2 * ht * (const.e**( (-E) / (k * T))) * (E ** ( T/2 ))) / (np.sqrt(const.pi) * (k * T)**(3/2)) +print(N) \ No newline at end of file diff --git a/lab3_task3.py b/lab3_task3.py new file mode 100644 index 000000000..499c31283 --- /dev/null +++ b/lab3_task3.py @@ -0,0 +1,16 @@ +import numpy as np +from lab3_task1 import g + +v0x = int(input("Введите скорость тела: ")) +x0 = int(input("Введите начальные координаты по x: ")) +y0 = int(input("Введите начальные координаты по y: ")) + +mas = [["t", "x", 'y']] + +for t in range(0, 6): + x = x0 + v0x * t + y = y0 + v0x * t - g * t**2 / 2 + mas.append([t, x, y]) + +mas = np.array(mas) +print(mas) diff --git a/lab3_task4.py b/lab3_task4.py new file mode 100644 index 000000000..d041693f9 --- /dev/null +++ b/lab3_task4.py @@ -0,0 +1,15 @@ +import numpy as np + +N = int(input("Ведите значение N: ")) +M = int(input("Ведите значение M: ")) + +trigonometry_array = np.zeros((N, M)) + + +for i in range (0, N ): + for k in range(0, M ): + trigonometry_array[i, k] = np.sin(N * i + M * k + 1) + if trigonometry_array[i, k] < 0: + trigonometry_array[i, k] = 0 + +print(trigonometry_array)