форкнуто от main/python-labs
Вы не можете выбрать более 25 тем
Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
136 строки
3.9 KiB
Markdown
136 строки
3.9 KiB
Markdown
# Отчет по теме 1
|
|
|
|
Турханов Артем, А-03-23
|
|
|
|
## 1 Изучение среды IDLE
|
|
|
|
## 1.1 Настройка текущего каталога
|
|
|
|
```py
|
|
>>> import os
|
|
>>> os.chdir('C:\\Users\\u111-03\\python-labs\\TEMA1\\')
|
|
>>> os.getcwd()
|
|
'C:\\Users\\u111-03\\python-labs\\TEMA1'
|
|
```
|
|
|
|
## 1.2 Настройка вида окна
|
|
Скриншот вида окна
|
|
|
|

|
|
|
|
## 1.3 Запуск программы Pr0 тремя способами
|
|
|
|
```py
|
|
>>>
|
|
============================== RESTART: C:/Users/u111-03/python-labs/TEMA1/Pr0.py =============================
|
|
Hello
|
|
Your name = Artem
|
|
>>> import Pr0
|
|
Hello
|
|
Your name = Artem
|
|
>>>
|
|
============================== RESTART: C:\Users\u111-03\python-labs\TEMA1\Pr0.py =============================
|
|
Hello
|
|
Your name = Artem
|
|
```
|
|
## 1.4 Анализ каталога __pycache__
|
|
Результат открытия файла Pr0.cpython-311
|
|
|
|

|
|
|
|
## 1.5 Запуск программы prb1
|
|
|
|
```py
|
|
>>> import prb1
|
|
Как Вас зовут? Artem
|
|
Привет, Artem
|
|
```
|
|
## 1.6 Работа с "помощью"
|
|
|
|
```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)
|
|
```
|
|
|
|
Окно помощи при вводе help(print)
|
|
|
|

|
|
|
|
Окно помощи при нажатии F1
|
|
|
|

|
|
|
|
Окно помощи, открытое через редактор (Python Docs)
|
|
|
|

|
|
|
|
## 1.7 Выполенение пнукта 15 задания
|
|
```py
|
|
>>>
|
|
============== RESTART: C:\Users\u111-03\python-labs\TEMA1\prb1.py =============
|
|
Как Вас зовут? Artem
|
|
Привет, Artem
|
|
|
|
>>>
|
|
========== RESTART: C:\Users\u111-03\python-labs\TEMA1\tdemo_chaos.py ==========
|
|
Traceback (most recent call last):
|
|
File "C:\Users\u111-03\python-labs\TEMA1\tdemo_chaos.py", line 58, in <module>
|
|
main()
|
|
File "C:\Users\u111-03\python-labs\TEMA1\tdemo_chaos.py", line 50, in main
|
|
plot(g, 0.35, "green")
|
|
File "C:\Users\u111-03\python-labs\TEMA1\tdemo_chaos.py", line 41, in plot
|
|
dot(5)
|
|
File "<string>", line 5, in dot
|
|
turtle.Terminator
|
|
```
|
|
Текст программы tdemo_chaos.py
|
|
|
|

|
|
|
|
Результат выполенения программы tdemo_chaos.py
|
|
|
|

|
|
|
|
Другие примеры
|
|
|
|
 |