byvs 1 неделю назад
Родитель 437460afc1
Сommit 2b2ffe1470

@ -0,0 +1,5 @@
#Программа по Теме 1 Степанищев Виктор Романович
print('Hello')
h=input('Your name=')
import os
os.chdir(r"/home/byvs/MPEI/Programming Python/Stepanishchev/TEMA1/")

Двоичные данные
TEMA1/figure0.png

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 18 KiB

Двоичные данные
TEMA1/figure1.png

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 14 KiB

@ -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 :
<image src="figure0.png">
Демонстрация работы модуля Turtle на примере clock из Turtle Demo в выпадающем меню help:
<image src="figure1.png">
Загрузка…
Отмена
Сохранить