# Отчёт по теме 1 Степанищев Виктор, А-03-23 ## 1 Знакомство с интерпретатором Введение инструкций в окно интерпретатора ```py >>>print('Hello') Hello >>>h=input('Your name=') Your name=Viktor >>>exit() ``` ## 2 Знакомство с интерактивной оболочкой IDLE Настройка текущего каталога ```py import os os.chdir(r"/home/byvs/MPEI/Programming Python/python-labs/TEMA1/") ``` Создание Pr0.py в рабочем каталоге и его запуск тремя способами: import Pr0, F5, 'Запустить модуль' ```py #Программа по Теме 1 Степанищев Виктор Романович print('Hello') h=input('Your name=') import os os.chdir(r"/home/byvs/MPEI/Programming Python/Stepanishchev/TEMA1/") ``` Запуск prb1.py ```py >>> import prb1 Как Вас зовут? Viktor Привет, Viktor ``` В папке _pycache_ хранится двоичный скомпилированный код, который нужен для оптимизации загрузки и запуска программы Раздел помощи help в главном меню IDLE предлагает следующие виды помощи: документацию по IDLE, доку по Python и наглядную демонстрацию работы модуля Turtle ```py >>>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: