diff --git a/TEMA1/Pr0.py b/TEMA1/Pr0.py new file mode 100644 index 0000000..5428f63 --- /dev/null +++ b/TEMA1/Pr0.py @@ -0,0 +1,5 @@ +#Программа по Теме 1 Степанищев Виктор Романович +print('Hello') +h=input('Your name=') +import os +os.chdir(r"/home/byvs/MPEI/Programming Python/Stepanishchev/TEMA1/") diff --git a/TEMA1/figure0.png b/TEMA1/figure0.png new file mode 100644 index 0000000..6a230fc Binary files /dev/null and b/TEMA1/figure0.png differ diff --git a/TEMA1/figure1.png b/TEMA1/figure1.png new file mode 100644 index 0000000..2ee3f90 Binary files /dev/null and b/TEMA1/figure1.png differ diff --git a/TEMA1/report.md b/TEMA1/report.md new file mode 100644 index 0000000..8ce8e8f --- /dev/null +++ b/TEMA1/report.md @@ -0,0 +1,96 @@ +#Отчёт по теме 1 + +Степанищев Виктор, А-03-23 + +## 1 Знакомство с интерпретатором + +Введение инструкций в окно интерпретатора +``` +>>>print('Hello') +Hello +>>>h=input('Your name=') +Your name=Viktor +>>>exit() +``` + +## 2 Знакомство с интерактивной оболочкой IDLE + +Настройка текущего каталога +``` +import os +os.chdir(r"/home/byvs/MPEI/Programming Python/python-labs/TEMA1/") +``` + +Создание Pr0.py в рабочем каталоге и его запуск тремя способами: import Pr0, F5, 'Запустить модуль' + +``` +#Программа по Теме 1 Степанищев Виктор Романович +print('Hello') +h=input('Your name=') +import os +os.chdir(r"/home/byvs/MPEI/Programming Python/Stepanishchev/TEMA1/") +``` + +Запуск prb1.py +``` +>>> import prb1 +Как Вас зовут? Viktor +Привет, Viktor +``` + +В папке _pycache_ хранится двоичный скомпилированный код, который нужен для оптимизации загрузки и запуска программы + +Раздел помощи help в главном меню IDLE предлагает следующие виды помощи: документацию по IDLE, доку по Python +и наглядную демонстрацию работы модуля Turtle + +``` +>>>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. + +(None, None) +``` + +Результат работы программы tdemo_chaos.py : + + +Демонстрация работы модуля Turtle на примере clock из Turtle Demo в выпадающем меню help: + \ No newline at end of file