From bca3b8a1483e6822d6d9bf9285fc7307afca393d Mon Sep 17 00:00:00 2001 From: manevr345 Date: Thu, 2 Oct 2025 16:13:49 +0000 Subject: [PATCH 1/7] my first commit --- README.md | 1 + int_my_first_program.py | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 int_my_first_program.py diff --git a/README.md b/README.md index f1ec59983..a0cbd51f8 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ # Базовый курс (моделирование на python) Репозиторий для прохождения базового курса по языку программирования python, в рамках общего цикла лекций "Моделирование на python". +print("747474") \ No newline at end of file diff --git a/int_my_first_program.py b/int_my_first_program.py new file mode 100644 index 000000000..104f35292 --- /dev/null +++ b/int_my_first_program.py @@ -0,0 +1,4 @@ +import os +a = os.name +print(a) +print("Hello world!") \ No newline at end of file From 2f5be6a2997f73a60c59ba3806db9e9042269cf0 Mon Sep 17 00:00:00 2001 From: manevr345 Date: Thu, 9 Oct 2025 16:50:53 +0000 Subject: [PATCH 2/7] myfirstlaba --- int_my_first_program.py | 5 +---- lec_datatype.py | 21 +++++++++++++++++++++ lec_input.py | 8 ++++++++ lec_liast.py | 11 +++++++++++ lec_math_oper.py | 7 +++++++ lec_object_link.py | 4 ++++ lec_print.py | 6 ++++++ lec_str.py | 8 ++++++++ task1.py | 7 +++++++ task2.py | 4 ++++ task3.py | 6 ++++++ task4.py | 7 +++++++ task5.py | 0 13 files changed, 90 insertions(+), 4 deletions(-) create mode 100644 lec_datatype.py create mode 100644 lec_input.py create mode 100644 lec_liast.py create mode 100644 lec_math_oper.py create mode 100644 lec_object_link.py create mode 100644 lec_print.py create mode 100644 lec_str.py create mode 100644 task1.py create mode 100644 task2.py create mode 100644 task3.py create mode 100644 task4.py create mode 100644 task5.py diff --git a/int_my_first_program.py b/int_my_first_program.py index 104f35292..39f820b02 100644 --- a/int_my_first_program.py +++ b/int_my_first_program.py @@ -1,4 +1 @@ -import os -a = os.name -print(a) -print("Hello world!") \ No newline at end of file +print('') \ No newline at end of file diff --git a/lec_datatype.py b/lec_datatype.py new file mode 100644 index 000000000..801b54dac --- /dev/null +++ b/lec_datatype.py @@ -0,0 +1,21 @@ + +print(type(3.454546)) + +print(type(3)) + +print(type("feret")) + +a = 'hhhhjhh' + +print(type(a)) + +a = ["jfjff", 1, 'Круто', 6, 8] + +print(type(a)) + +print(a[-3]) + +print(type(True)) + +print(type(None)) +print(print(5)) \ No newline at end of file diff --git a/lec_input.py b/lec_input.py new file mode 100644 index 000000000..1232cca92 --- /dev/null +++ b/lec_input.py @@ -0,0 +1,8 @@ +a =input() +print(a) + +a = input("Введите значение а: ") +print(a) +print(type(a)) +a = int(input("Введите целое число" )) +print(type(a)) \ No newline at end of file diff --git a/lec_liast.py b/lec_liast.py new file mode 100644 index 000000000..b66c43fcb --- /dev/null +++ b/lec_liast.py @@ -0,0 +1,11 @@ +a = [1, 3, 6] +print(a[-1]) + +b = [8, 6, 11] +c = a + b +print(c) +print(c * 2) +c.append("God") +print(c) +a.append(b) +print(a) \ No newline at end of file diff --git a/lec_math_oper.py b/lec_math_oper.py new file mode 100644 index 000000000..61bb5d1da --- /dev/null +++ b/lec_math_oper.py @@ -0,0 +1,7 @@ +print(3 + 4) +print(3 - 4) +print(3 * 4) +print(4 ** 3) +print(4 / 3) +print(4 // 3) +print(3 % 4) \ No newline at end of file diff --git a/lec_object_link.py b/lec_object_link.py new file mode 100644 index 000000000..dee8766a2 --- /dev/null +++ b/lec_object_link.py @@ -0,0 +1,4 @@ +s = 3 + 4 +memory_id = id(s) +print(s, memory_id) +s = 5 #nova stroka diff --git a/lec_print.py b/lec_print.py new file mode 100644 index 000000000..fa50f8435 --- /dev/null +++ b/lec_print.py @@ -0,0 +1,6 @@ +print() + +print(3) + +print(3 + 4) +print(3, 4) diff --git a/lec_str.py b/lec_str.py new file mode 100644 index 000000000..2f020bdb0 --- /dev/null +++ b/lec_str.py @@ -0,0 +1,8 @@ +a = 'Good' +b = 'Bad' +print(a + b) # Сложение строк +print(a*3) +c = 50 +d =10 +print(f'Вставим числа {c} и {d}') +print(len(a)) diff --git a/task1.py b/task1.py new file mode 100644 index 000000000..c2b910c55 --- /dev/null +++ b/task1.py @@ -0,0 +1,7 @@ +print('Hello, World!') + +print('Маша + Петя = Любовь') + +print('х = 3 + 4') +x = 3 + 4 +print(f'x = {x}') \ No newline at end of file diff --git a/task2.py b/task2.py new file mode 100644 index 000000000..54673be0f --- /dev/null +++ b/task2.py @@ -0,0 +1,4 @@ +print(type('Hello, World!')) +print(type(3 + 4)) +print(type( 3 / 4)) +print(type([1, 2, 5, 10, 100])) \ No newline at end of file diff --git a/task3.py b/task3.py new file mode 100644 index 000000000..57b0e6adc --- /dev/null +++ b/task3.py @@ -0,0 +1,6 @@ +x = 3 + +y = (x ** (3/2))/(x**3+3/x)*(4 * x**7 - x**5) + 80 * (27 * x**4 + 12 * x**3 - 5*x**2 + 10)**0.5 +print(y) +y = (1.5 + int(16.7*4.32))/(14.5 + 31/12 - int(x ** 3.4)) +print(y) \ No newline at end of file diff --git a/task4.py b/task4.py new file mode 100644 index 000000000..3661d894b --- /dev/null +++ b/task4.py @@ -0,0 +1,7 @@ +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/task5.py b/task5.py new file mode 100644 index 000000000..e69de29bb From c6e17470df5ae73a48281b25751f7767ddd64741 Mon Sep 17 00:00:00 2001 From: manevr345 Date: Thu, 16 Oct 2025 14:09:58 +0000 Subject: [PATCH 3/7] =?UTF-8?q?=D0=95=D1=83=D1=87=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- task3.py | 5 ++++- task5.py | 9 +++++++++ task6.py | 16 ++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 task6.py diff --git a/task3.py b/task3.py index 57b0e6adc..b675b9eb7 100644 --- a/task3.py +++ b/task3.py @@ -1,6 +1,9 @@ x = 3 y = (x ** (3/2))/(x**3+3/x)*(4 * x**7 - x**5) + 80 * (27 * x**4 + 12 * x**3 - 5*x**2 + 10)**0.5 + print(y) -y = (1.5 + int(16.7*4.32))/(14.5 + 31/12 - int(x ** 3.4)) + +y = (1.5 + int(16.7*4.32)) / (14.5 + 31/12 - int(x ** 3.4)) + print(y) \ No newline at end of file diff --git a/task5.py b/task5.py index e69de29bb..beeb42fe4 100644 --- a/task5.py +++ b/task5.py @@ -0,0 +1,9 @@ +print("Шляпка гриба, покрытая … кожиц..й, держится на … ножк.. . Снизу шляпка затянута … плёнкой. Когда её уберёшь, откроется нижняя … сторона шляпк.. .") +slv1 = input("Введи с клавиатуры недостающее первое слово: покрытая ... кожцй: ") +ltr1 = input("Введи с клавиатуры недостающую первую букву: покрытая кожиц...й: ") +slv2 = input("Введи с клавиатуры недостающее второе слово: держится на … ножк: ") +ltr2 = input("Введи с клавиатуры недостающую вторую букву: на ножк...: ") +slv3 = input("Введи с клавиатуры недостающее третье слово: ... пленкой: ") +slv4 = input("Введи с клавиатуры недостающее четвертое слово: ... сторона: ") +ltr3 = input("Введи с клавиатуры недостающее третью букву: сторона шляпк... : ") +print(f"Шляпка гриба, покрытая {slv1} кожиц{ltr1}й, держится на {slv2} ножк{ltr2} . Снизу шляпка затянута {slv3} плёнкой. Когда её уберёшь, откроется нижняя {slv4} сторона шляпк{ltr3}.") \ No newline at end of file diff --git a/task6.py b/task6.py new file mode 100644 index 000000000..b0340eeaf --- /dev/null +++ b/task6.py @@ -0,0 +1,16 @@ +age = input("возраст пользователя: " ) + +gender = input("пол пользователя: ") + +name = input('имя пользователя: ') + +town = input('город пользователя: ') + +classi = input('класс обучения: ') +inf = [] +inf.append(age) +inf.append(gender) +inf.append(name) +inf.append(town) +inf.append(classi) +print(inf) \ No newline at end of file From 752815448e2944b566bf7e3608002d8f525dd66e Mon Sep 17 00:00:00 2001 From: manevr345 Date: Thu, 16 Oct 2025 14:10:06 +0000 Subject: [PATCH 4/7] =?UTF-8?q?=D0=95=D1=83=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..ba2a6c013 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "python-envs.defaultEnvManager": "ms-python.python:system", + "python-envs.pythonProjects": [] +} \ No newline at end of file From ce12915c86a54b09ae183edf40b156e01172d58f Mon Sep 17 00:00:00 2001 From: manevr345 Date: Thu, 16 Oct 2025 14:17:29 +0000 Subject: [PATCH 5/7] myfirstlaba --- task5.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/task5.py b/task5.py index beeb42fe4..37a243934 100644 --- a/task5.py +++ b/task5.py @@ -1,9 +1,17 @@ print("Шляпка гриба, покрытая … кожиц..й, держится на … ножк.. . Снизу шляпка затянута … плёнкой. Когда её уберёшь, откроется нижняя … сторона шляпк.. .") + slv1 = input("Введи с клавиатуры недостающее первое слово: покрытая ... кожцй: ") + ltr1 = input("Введи с клавиатуры недостающую первую букву: покрытая кожиц...й: ") + slv2 = input("Введи с клавиатуры недостающее второе слово: держится на … ножк: ") + ltr2 = input("Введи с клавиатуры недостающую вторую букву: на ножк...: ") + slv3 = input("Введи с клавиатуры недостающее третье слово: ... пленкой: ") + slv4 = input("Введи с клавиатуры недостающее четвертое слово: ... сторона: ") + ltr3 = input("Введи с клавиатуры недостающее третью букву: сторона шляпк... : ") + print(f"Шляпка гриба, покрытая {slv1} кожиц{ltr1}й, держится на {slv2} ножк{ltr2} . Снизу шляпка затянута {slv3} плёнкой. Когда её уберёшь, откроется нижняя {slv4} сторона шляпк{ltr3}.") \ No newline at end of file From 7145cbcd5ea83a9584268dcb769bc04c6875c3f5 Mon Sep 17 00:00:00 2001 From: manevr345 Date: Thu, 16 Oct 2025 15:53:57 +0000 Subject: [PATCH 6/7] sosi --- doptask1.py | 3 +++ doptask2.py | 5 +++++ doptask3.py | 5 +++++ doptask4.py | 4 ++++ 4 files changed, 17 insertions(+) create mode 100644 doptask1.py create mode 100644 doptask2.py create mode 100644 doptask3.py create mode 100644 doptask4.py diff --git a/doptask1.py b/doptask1.py new file mode 100644 index 000000000..6b57adea2 --- /dev/null +++ b/doptask1.py @@ -0,0 +1,3 @@ +comp1 = [int(input("Введите стоимость мыши 1: ")), int(input("Введите стоимость монитора 1: ")), int(input("Введите стоимость системный блок 1: ")), int(input('Введите стоимость клавы: '))] +value = comp1*3 +print(3*(comp1[0] + comp1[1]+comp1[2] + comp1[3])) diff --git a/doptask2.py b/doptask2.py new file mode 100644 index 000000000..92b03dd23 --- /dev/null +++ b/doptask2.py @@ -0,0 +1,5 @@ +num1 = int(input()) +num2 = num1+1 +num3 = num1-1 +print(f'Следующее число за {num1}: {num2}') +print(f'Предыдущее число за {num1}: {num3}') \ No newline at end of file diff --git a/doptask3.py b/doptask3.py new file mode 100644 index 000000000..c3c16b360 --- /dev/null +++ b/doptask3.py @@ -0,0 +1,5 @@ +rebro = int(input('Ребро значение: ')) +V = rebro**3 +S = 6*(rebro**2) +print(f"Объем фигуры V: {V} ") +print(f"площадь поверхности: {S}") \ No newline at end of file diff --git a/doptask4.py b/doptask4.py new file mode 100644 index 000000000..666b5595a --- /dev/null +++ b/doptask4.py @@ -0,0 +1,4 @@ +num1 = int(input('Введите Число 1: ')) +num2 = int(input("Введите Число 2: ")) +value = ((num1 + num2) ** 3)*3 + 275*(num2 ** 2) - 127 * num1 - 41 +print(value) \ No newline at end of file From c176fb35a81559382f7f33e3a2acbeee04465e9c Mon Sep 17 00:00:00 2001 From: manevr345 Date: Thu, 16 Oct 2025 15:57:02 +0000 Subject: [PATCH 7/7] sosi --- doptask1.py | 1 - 1 file changed, 1 deletion(-) diff --git a/doptask1.py b/doptask1.py index 6b57adea2..2d3396e1e 100644 --- a/doptask1.py +++ b/doptask1.py @@ -1,3 +1,2 @@ comp1 = [int(input("Введите стоимость мыши 1: ")), int(input("Введите стоимость монитора 1: ")), int(input("Введите стоимость системный блок 1: ")), int(input('Введите стоимость клавы: '))] -value = comp1*3 print(3*(comp1[0] + comp1[1]+comp1[2] + comp1[3]))