diff --git a/TEMA1/Pr0.py b/TEMA1/Pr0.py new file mode 100644 index 0000000..7304066 --- /dev/null +++ b/TEMA1/Pr0.py @@ -0,0 +1,6 @@ +#This is a very profound comment +#Программа по Теме 1 Савин С.А. +print('Hello') +h = input('Your name is -') +import os +os.chdir(r'C:\Users\u207-05\python-labs\TEMA1') diff --git a/TEMA1/pic1.png b/TEMA1/pic1.png new file mode 100644 index 0000000..04c829b Binary files /dev/null and b/TEMA1/pic1.png differ diff --git a/TEMA1/pic2.png b/TEMA1/pic2.png new file mode 100644 index 0000000..58f61c2 Binary files /dev/null and b/TEMA1/pic2.png differ diff --git a/TEMA1/report.md b/TEMA1/report.md index e69de29..269f46f 100644 --- a/TEMA1/report.md +++ b/TEMA1/report.md @@ -0,0 +1,124 @@ +# Отчет по ЛР1 Савин С.А. + + + +## Пункты3-5 +Через командную строку вы +```py +print('Hello') +h=input('Your name is -') +Hello +Your name is -sam +exit() +``` +Программа закрыта (Вся командная строка) + +## Пункт 8: +```py +import os +os.chdir(r'C:\Users\u207-05\python-labs\TEMA1') +``` + +## Пункт 9: +Были изменены параметры текста в редакторе при помощи меню "Options" + +## Пункт 10: +Создан новый файл в редакторе написано: +```py +#This is a very profound comment +#Программа по Теме 1 Савин С.А. +print('Hello') +h = input('Your name is -') +import os +os.chdir(r'C:\Users\u207-05\python-labs\TEMA1') +``` +Модуль запущен +### Вывод: +```py += RESTART: C:/Users/u207-05/python-labs/TEMA1/Pr0.py +Hello +Your name is -sam +``` +Последняя команда выбора рабочей папки выполнена без ошибок. + +Также файл был выполнен следующим образом: +```py +import Pr0 +Hello +Your name is -sam +``` +И аналогично через клавишу F5 в открытом редакторе. + +## Пункт 11: +При помощи повторного вызова команды import вставили имя файла - "prb1" +```py +import prb1 +Как Вас зовут? Семён +Привет, Семён +``` + +## Пункт 12: +В папке __pycache__ нашел файл +pr0.cpython-311, открыл при помощи notepad++ +Содержимое: +§ + + №йєhВ г  уZ —  e d ¦ «   ed¦ « ZddlZ ej d¦ «  dS )ЪHellozYour name is -й Nz"C:\Users\u207-05\python-labs\TEMA1)ЪprintЪinputЪhЪosЪchdir© у ъ)C:\Users/u207-05/python-labs/TEMA1\Pr0.pyъr  sF рр ЂЂgЃ„ЂШ ЂEР +СФЂШ Ђ Ђ Ђ Ш Ђ„Р .С /Ф /Р /Р /Р /r + +Это резльтат компиляции, который выглядит так по причине того, что в данной папке хранятся байт-коды, используемые при запуске программы для увеличения оптимизации. + +## Пункт 13: +Пропущен по причине уже созданного файла report.md. + +## Пункт 14: +Вызвана команда help по нескольким функциям. +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. +Также была найдена запись о функции print() через f1 +## Пункт 15: +Были снова выполнены файлы из рабочей папки, проведена работа с окнами. +Результат работы tdemo_chaos: + +![C:\Users\u207-05\python-labs\TEMA1](pic1.png) + +Результат работы часов clock из примеров для демо: +