diff --git a/TEMA1/4MIMIMAMOMU.png b/TEMA1/4MIMIMAMOMU.png new file mode 100644 index 0000000..a182286 Binary files /dev/null and b/TEMA1/4MIMIMAMOMU.png differ diff --git a/TEMA1/5ORCLOCK.png b/TEMA1/5ORCLOCK.png new file mode 100644 index 0000000..17b8730 Binary files /dev/null and b/TEMA1/5ORCLOCK.png differ diff --git a/TEMA1/CHAOUS.png b/TEMA1/CHAOUS.png new file mode 100644 index 0000000..3d5e80a Binary files /dev/null and b/TEMA1/CHAOUS.png differ diff --git a/TEMA1/COLOR.png b/TEMA1/COLOR.png new file mode 100644 index 0000000..62d4676 Binary files /dev/null and b/TEMA1/COLOR.png differ diff --git a/TEMA1/ERROR.png b/TEMA1/ERROR.png new file mode 100644 index 0000000..fdb76bf Binary files /dev/null and b/TEMA1/ERROR.png differ diff --git a/TEMA1/HELPPRINT.png b/TEMA1/HELPPRINT.png new file mode 100644 index 0000000..0d6867d Binary files /dev/null and b/TEMA1/HELPPRINT.png differ diff --git a/TEMA1/IIIPIFT.png b/TEMA1/IIIPIFT.png new file mode 100644 index 0000000..21bd3be Binary files /dev/null and b/TEMA1/IIIPIFT.png differ diff --git a/TEMA1/OBOLOCHKApng.png b/TEMA1/OBOLOCHKApng.png new file mode 100644 index 0000000..bde6386 Binary files /dev/null and b/TEMA1/OBOLOCHKApng.png differ diff --git a/TEMA1/PROT.png b/TEMA1/PROT.png new file mode 100644 index 0000000..d51602e Binary files /dev/null and b/TEMA1/PROT.png differ diff --git a/TEMA1/Pr0.py b/TEMA1/Pr0.py new file mode 100644 index 0000000..10ab2d4 --- /dev/null +++ b/TEMA1/Pr0.py @@ -0,0 +1,6 @@ +#Программа по Теме 1 Анисенков Павел Дмитриевич +print('Hello') +h=input('Your name=') +import os +os.chdir('C:\\Users\\Professional\\Desktop\\python-labs\\TEMA1\\') + diff --git a/TEMA1/SIZE.png b/TEMA1/SIZE.png new file mode 100644 index 0000000..4849357 Binary files /dev/null and b/TEMA1/SIZE.png differ diff --git a/TEMA1/ZAPUSK.png b/TEMA1/ZAPUSK.png new file mode 100644 index 0000000..26483ab Binary files /dev/null and b/TEMA1/ZAPUSK.png differ diff --git a/TEMA1/protokol.txt b/TEMA1/protokol.txt new file mode 100644 index 0000000..a99fc7e --- /dev/null +++ b/TEMA1/protokol.txt @@ -0,0 +1,64 @@ +#Протокол по Теме 1 Анисенков Павел Дмитриевич +Python 3.13.6 (tags/v3.13.6:4e66535, Aug 6 2025, 14:36:00) [MSC v.1944 64 bit (AMD64)] on win32 +Enter "help" below or click "Help" above for more information. +import os +os.chdir('C:\\Users\\Professional\\Desktop\\python-labs\\TEMA1\\') + +============================================================ RESTART: C:/Users/Professional/Desktop/python-labs/TEMA1/Pr0.py =========================================================== +Hello +Your name=Paulik +import Pr0 +Hello +Your name=Paulik + +============================================================ RESTART: C:/Users/Professional/Desktop/python-labs/TEMA1/Pr0.py =========================================================== +Hello +Your name=Paulik +import prb1 +Как Вас зовут? Paulik +Привет, Paulik + +help(print) +Help on built-in function print in module builtins: + + +print(*args, sep=' ', end='\n', file=None, flush=False) + Prints the values to a stream, or to sys.stdout by default. + + sep + string inserted between values, default a space. + end + string appended after the last value, default a newline. + file + a file-like object (stream); defaults to the current sys.stdout. + flush + whether to forcibly flush the stream. + + +help(print); help(input) +Help on built-in function print in module builtins: + +print(*args, sep=' ', end='\n', file=None, flush=False) + Prints the values to a stream, or to sys.stdout by default. + + sep + string inserted between values, default a space. + end + string appended after the last value, default a newline. + file + a file-like object (stream); defaults to the current sys.stdout. + flush + whether to forcibly flush the stream. + +Help on built-in function input in module builtins: + +input(prompt='', /) + 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. + +import tdemo_chaos diff --git a/TEMA1/report.md b/TEMA1/report.md new file mode 100644 index 0000000..0b1a67e --- /dev/null +++ b/TEMA1/report.md @@ -0,0 +1,135 @@ +# Отчет по теме 1 + +Анисенков Павел, А-01-23 + +## 1-2. Запуск + Была запущена программа-интерпретатор: +![](ZAPUSK.png) + +## 3-5. Диалоговое окно + + Были введены несколько инструкций в диалоговое окно интерпретатора: + +```py +print('hello') +hello + +h=input('Your name=') +Your name=paulik + +exit() - закрывает интерпретатор +``` + +## 6-7. Интерактивная графическая оболочка + +![](OBOLOCHKA.png) + + было изучено устройство главного командного окна среды. + +## 8. Настройка рабочего каталога. + +```py +import os +os.chdir('C:\\Users\\Professional\\Desktop\\python-labs\\TEMA1\\') +``` + +## 9. Персонализация среды. + +![](IIIPIFT.png) + +![](COLOR.png) + +![](SIZE.png) + +## 10. Окно редактора + Воспользовались окном редактора для написания кода, результат: + + ============================================================ RESTART: C:/Users/Professional/Desktop/python-labs/TEMA1/Pr0.py =========================================================== + Hello + Your name=Paulik + +### Были использованы следующие методы запуска инструкций: +1) Меню редактора: Run module +2) Кнопка F5 +3) Команда import Pr0 + +## 11. Запуск prb1 + + import prb1 + Как Вас зовут? Paulik + Привет, Paulik + +## 12-13. Просмотр pycache +![](PROT.png) + Открыли каталог __pycache__ и попытались открыть в текстовом редакторе файл Pr0.cpython-34.pyc – результат работы компилятора среды. +![](ERROR.PNG) + .pyc - это не текстовые файлы: .pyc файлы содержат скомпилированный байт-код, а не читаемый текст. Поэтому IDLE, как текстовый редактор, не может правильно интерпретировать содержимое .pyc файла как текст. + Компиляция — это процесс перевода исходного кода на языке программирования в машинный код. Если этого не сделать, компьютер не поймёт, как выполнить инструкции разработчика. Поэтому мы отдаём компилятору строки кода, а он сравнивает их со своим словарём, учитывает контекст и выдаёт набор из нулей и единиц. + +## 14. Вызов раздела помощи + + help(print) +Help on built-in function print in module builtins: + +print(*args, sep=' ', end='\n', file=None, flush=False) + Prints the values to a stream, or to sys.stdout by default. + + sep + string inserted between values, default a space. + end + string appended after the last value, default a newline. + file + a file-like object (stream); defaults to the current sys.stdout. + flush + whether to forcibly flush the stream. + + help(print); help(input) +Help on built-in function print in module builtins: + +print(*args, sep=' ', end='\n', file=None, flush=False) + Prints the values to a stream, or to sys.stdout by default. + + sep + string inserted between values, default a space. + end + string appended after the last value, default a newline. + file + a file-like object (stream); defaults to the current sys.stdout. + flush + whether to forcibly flush the stream. + +Help on built-in function input in module builtins: + +input(prompt='', /) + 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. + + Также были рассмотрены другие способы получения раздела помощи. + +F1 -- index: +![](HELPPRINT.png) + + + + +### 15.1 Открыт prb1.py + Как Вас зовут? Paulik + Привет, Paulik + +### 15.2 Перемещение между окнами и запуск программы из окна редактора +![](4MIMIMAMOMU.png) + +### 15.3 Была запущена программа tdemo_chaos +![](CHAOuS.png) + +### 15.4 Рассмотрение примеров использования графической составляющией среды Python + зашли в предложение «Помощь (Help)» и «Демонстрации (Turtle Demo)». В появившемся новом окне в меню выберали предложение «Примеры (Examples)» и из появляющегося списка примеров – «Часы (Clock)». Нажмали кнопку «Запуск (Start)» в нижней части окна. +![](5orclock.png) + Данные примеры способны помочь в плане структуризации собственного кода и изучении новых команд. + +## 16. Выход из среды