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 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/doptask1.py b/doptask1.py new file mode 100644 index 000000000..2d3396e1e --- /dev/null +++ b/doptask1.py @@ -0,0 +1,2 @@ +comp1 = [int(input("Введите стоимость мыши 1: ")), int(input("Введите стоимость монитора 1: ")), int(input("Введите стоимость системный блок 1: ")), int(input('Введите стоимость клавы: '))] +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 diff --git a/int_my_first_program.py b/int_my_first_program.py new file mode 100644 index 000000000..39f820b02 --- /dev/null +++ b/int_my_first_program.py @@ -0,0 +1 @@ +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..b675b9eb7 --- /dev/null +++ b/task3.py @@ -0,0 +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)) + +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..37a243934 --- /dev/null +++ b/task5.py @@ -0,0 +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 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