From de0eb4286b9a7b3bb4237474285b328373af22f9 Mon Sep 17 00:00:00 2001 From: GoloshchapovDY Date: Wed, 10 Sep 2025 16:51:43 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BE=D1=82=D1=87=D0=B5=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TEMA1/report.md | 159 ++++++++++++++++++++++++++---------------------- 1 file changed, 86 insertions(+), 73 deletions(-) diff --git a/TEMA1/report.md b/TEMA1/report.md index 28a3987..6a63223 100644 --- a/TEMA1/report.md +++ b/TEMA1/report.md @@ -13,19 +13,23 @@ # Пункт 3 Введение пробных команд -print("hello") -hello + print("hello") + + hello # Пункт 4 Вводим еще одну инструкцию -h = input('Your name = ') -Your name = Dima -h -'Dima' + h = input('Your name = ') + + Your name = Dima + + h + + 'Dima' # Пункт 5 Завершение работы интерпретатора -exit() + exit() # Пункты 6-7 @@ -34,8 +38,9 @@ exit() # Пункт 8 Настройка рабочего каталога - import os - os.chdir('C:\\Users\\Дмитрий\\OneDrive\\Рабочий стол\\Goloshchapov\\python-labs\\TEMA1') + import os + + os.chdir('C:\\Users\\Дмитрий\\OneDrive\\Рабочий стол\\Goloshchapov\\python-labs\\TEMA1') # Пункт 9 Настройки(Options) @@ -46,47 +51,57 @@ exit() В текстовом редакторе IDLE создана программа следующего содержания: - #Программа по теме 1 <Голощапов Дмитрий Евгеньевич> + #Программа по теме 1 <Голощапов Дмитрий Евгеньевич> + + print('Hello') + + h=input('Your name=') - print('Hello') - h=input('Your name=') - import os - os.chdir('C:\\Users\\Дмитрий\\OneDrive\\Рабочий стол\\Goloshchapov\\python-labs\\TEMA1') + import os + + os.chdir('C:\\Users\\Дмитрий\\OneDrive\\Рабочий стол\\Goloshchapov\\python-labs\\TEMA1') Она делает следующий вывод: -======= RESTART: C:\Users\Дмитрий\OneDrive\Рабочий стол\Goloshchapov\python-labs\TEMA1\Pr0.py ====== -Hello -Your name= + ======= RESTART: C:\Users\Дмитрий\OneDrive\Рабочий стол\Goloshchapov\python-labs\TEMA1\Pr0.py ====== + + Hello + + Your name= Другой вариант запуска: -import Pr0 + import Pr0 -hello -Your name = + hello + + Your name = При нажатии f5 в активном окне редактора: -======= RESTART: C:\Users\Дмитрий\OneDrive\Рабочий стол\Goloshchapov\python-labs\TEMA1\Pr0.py ====== -hello -Your name = + ======= RESTART: C:\Users\Дмитрий\OneDrive\Рабочий стол\Goloshchapov\python-labs\TEMA1\Pr0.py ====== + + hello + + Your name = # Пункт 11 Запуск программы из рабочего каталога Из консоли вызван файл prb1.py -import prb1 + import prb1 -Как Вас зовут? Dima -Привет, Dima + Как Вас зовут? Dima + + Привет, Dima # Пункт 12 Изучение рабочего каталога Файл Pr0.cpython-310.pyc открыт в Блокноте. -o - ЛFёhэ г  @ s& e d ѓ edѓZddlZe dЎ dS )ZHelloz -Your name=й NuW C:\Users\Дмитрий\OneDrive\Рабочий стол\Goloshchapov\python-labs\TEMA1)ЪprintЪinputЪhЪosЪchdir© r r х^ C:\Users\Дмитрий\OneDrive\Рабочий стол\Goloshchapov\python-labs\TEMA1\Pr0.pyЪ s  + + o + ЛFёhэ г  @ s& e d ѓ edѓZddlZe dЎ dS )ZHelloz + Your name=й NuW C:\Users\Дмитрий\OneDrive\Рабочий стол\Goloshchapov\python-labs\TEMA1)ЪprintЪinputЪhЪosЪchdir© r r х^ C:\Users\Дмитрий\OneDrive\Рабочий стол\Goloshchapov\python-labs\TEMA1\Pr0.pyЪ s  Видно, что рeзультат компиляции тяжел для восприятия человеком, вероятно, из-за несоответствия кодировок. Комплиляция программ необходима, чтобы @@ -111,46 +126,44 @@ Python Docs - документация по языку Turtle Demo - окно работы и помощь модуля для работы с графикой turtle -Проверка команды: -help (print) +Проверка команд: + + help (print) -Help on built-in function print in module builtins: -print(...) - print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False) - - Prints the values to a stream, or to sys.stdout by default. - Optional keyword arguments: - file: a file-like object (stream); defaults to the current sys.stdout. - sep: string inserted between values, default a space. - end: string appended after the last value, default a newline. - flush: whether to forcibly flush the stream. - -help(print), help(input) + Help on built-in function print in module builtins: + + print(...) + print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False) + Prints the values to a stream, or to sys.stdout by default. + Optional keyword arguments: + file: a file-like object (stream); defaults to the current sys.stdout. + sep: string inserted between values, default a space. + end: string appended after the last value, default a newline. + flush: whether to forcibly flush the stream. + + help(print), help(input) -Help on built-in function print in module builtins: - -print(...) - print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False) - - Prints the values to a stream, or to sys.stdout by default. - Optional keyword arguments: - file: a file-like object (stream); defaults to the current sys.stdout. - sep: string inserted between values, default a space. - end: string appended after the last value, default a newline. - flush: whether to forcibly flush the stream. - -Help on built-in function input in module builtins: - -input(prompt=None, /) - Read a string from standard input. The trailing newline is stripped. - - The prompt string, if given, is printed to standard output without a - trailing newline before reading input. - - If the user hits EOF (*nix: Ctrl-D, Windows: Ctrl-Z+Return), raise EOFError. - On *nix systems, readline is used if available. - -(None, None) + Help on built-in function print in module builtins: + + print(...) + print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False) + Prints the values to a stream, or to sys.stdout by default. + Optional keyword arguments: + file: a file-like object (stream); defaults to the current sys.stdout. + sep: string inserted between values, default a space. + end: string appended after the last value, default a newline. + flush: whether to forcibly flush the stream. + + Help on built-in function input in module builtins: + + input(prompt=None, /) + Read a string from standard input. The trailing newline is stripped. + The prompt string, if given, is printed to standard output without a + trailing newline before reading input. + If the user hits EOF (*nix: Ctrl-D, Windows: Ctrl-Z+Return), raise EOFError. + On *nix systems, readline is used if available. + + (None, None) F1 -> Указатель -> print() (built-in function) выводит справку по этой функции @@ -163,17 +176,17 @@ File - Open - prb1.py С помощью Window можно переключаться между всеми открытыми окнами -prb1.py - Run + prb1.py - Run -====== RESTART: C:\Users\Дмитрий\OneDrive\Рабочий стол\Goloshchapov\python-labs\TEMA1\prb1.py ====== -Как Вас зовут? Dima -Привет, Dima + ====== RESTART: C:\Users\Дмитрий\OneDrive\Рабочий стол\Goloshchapov\python-labs\TEMA1\prb1.py ====== + Как Вас зовут? Dima + Привет, Dima -import tdemo_chaos + import tdemo_chaos Help - Turtle Demo - clock - Start выводит на экран графическое представление программы - циферблат с часами. Есть и другие примеры программ модуля turtle, которые можно брать за основу собственных программ, изменять или реализовывать свои идеи. -16. Завершена работа со средой: File - exit \ No newline at end of file +# Пункт 16. Завершена работа со средой: File - exit \ No newline at end of file