diff --git a/TEMA1/Pr0.py b/TEMA1/Pr0.py new file mode 100644 index 0000000..cfc290a --- /dev/null +++ b/TEMA1/Pr0.py @@ -0,0 +1,6 @@ +# Программа по Теме 1 Девятова МЕ + +print('Hello') +h=input('Your name=') +import os +os.chdir('C:\\Users\\u207-05\\Desktop\\ПОАС\\python-labs\\TEMA1\\') diff --git a/TEMA1/figure01.PNG b/TEMA1/figure01.PNG new file mode 100644 index 0000000..6a6deeb Binary files /dev/null and b/TEMA1/figure01.PNG differ diff --git a/TEMA1/figure02.PNG b/TEMA1/figure02.PNG new file mode 100644 index 0000000..e331fb5 Binary files /dev/null and b/TEMA1/figure02.PNG differ diff --git a/TEMA1/figure03.PNG b/TEMA1/figure03.PNG new file mode 100644 index 0000000..861320f Binary files /dev/null and b/TEMA1/figure03.PNG differ diff --git a/TEMA1/figure04.PNG b/TEMA1/figure04.PNG new file mode 100644 index 0000000..0dfb639 Binary files /dev/null and b/TEMA1/figure04.PNG differ diff --git a/TEMA1/figure05.PNG b/TEMA1/figure05.PNG new file mode 100644 index 0000000..13f9543 Binary files /dev/null and b/TEMA1/figure05.PNG differ diff --git a/TEMA1/figure06.PNG b/TEMA1/figure06.PNG new file mode 100644 index 0000000..9159322 Binary files /dev/null and b/TEMA1/figure06.PNG differ diff --git a/TEMA1/report.md.txt b/TEMA1/report.md.txt new file mode 100644 index 0000000..24e5ef7 --- /dev/null +++ b/TEMA1/report.md.txt @@ -0,0 +1,104 @@ +# Отчет по теме 1 + +Девятова Мария, А-03-23 + +## 1 Знакомство с интерпретатором и интерактивной оболочкой IDLE + +## 1.1 Настройка текущего каталога и окна IDLE + +``` +import os +os.chdir('C:\\Users\\u207-05\\Desktop\\ПОАС\\python-labs\\TEMA1\\') +``` + +![Скриншот настройки шрифта](figure01.png) +![Скриншот настройки окна](figure02.png) +![Скриншот настройки подсветки комментариев](figure03.png) + +## 1.2 Запуск программы в командном окне + +Был создан файл Pr0.py, в командном окне IDLE был запущен на выполнение + файл prb1.py, данный изначально. +Результаты выполнения: + +``` +import Pr0 +Hello +Your name=Maria +import prb1 +Как Вас зовут? Maria +Привет, Maria +``` + +## 1.3 Содержимое файла в папке pycache + +После запуска Pr0.py в рабочем каталоге появилась папка pycache, в которой расположен файл Pr0.cpython-311.pyc +Данный файл содержит байт-код для исходного Pr0.py, который интерпретируется виртуальной машиной Python. +Фрагмент файла, открытый в текстовом редакторе, приведен ниже: + +![Скриншот с частью файла Pr0.cpython-311.pyc](figure04.png) + +## 1.4 Изучение раздела help + +Было выполнено обращение к помощи по функции print(), затем по функциям print(), input() + +``` +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. +``` + +## 1.5 Выполнение пункта 15 + +``` +======= RESTART: C:\Users\u207-05\Desktop\ПОАС\python-labs\TEMA1\prb1.py ======= +Как Вас зовут? Maria +Привет, Maria +``` +``` +import tdemo_chaos +``` + +![Результат выполнения tdemo_chaos](figure05.png) + +Через раздел помощи Help был запущен пример clock, результат ниже: + +![Часы](figure06.png) \ No newline at end of file