Сравнить коммиты
2 Коммитов
Автор | SHA1 | Дата |
---|---|---|
|
35c17bfcde | 5 дней назад |
|
9659d0e112 | 5 дней назад |
До Ширина: | Высота: | Размер: 15 KiB После Ширина: | Высота: | Размер: 15 KiB |
@ -1,5 +0,0 @@
|
|||||||
#Программа по Теме 1 <Антонов Дмитрий Антонович>
|
|
||||||
print('Hello')
|
|
||||||
h=input('Your name=')
|
|
||||||
import os
|
|
||||||
os.chdir('C:\\Users\\u111-01\\Desktop\\python-labs\\TEMA1\\')
|
|
До Ширина: | Высота: | Размер: 11 KiB |
До Ширина: | Высота: | Размер: 29 KiB |
До Ширина: | Высота: | Размер: 114 KiB |
До Ширина: | Высота: | Размер: 139 KiB |
До Ширина: | Высота: | Размер: 45 KiB |
До Ширина: | Высота: | Размер: 56 KiB |
До Ширина: | Высота: | Размер: 54 KiB |
@ -1,100 +0,0 @@
|
|||||||
# Отчет по теме 1
|
|
||||||
|
|
||||||
Антонов Дмитрий, А-03-23
|
|
||||||
|
|
||||||
## 1 Изучение среды IDLE
|
|
||||||
|
|
||||||
## 1.1 Начало работы
|
|
||||||
```py
|
|
||||||
print('Hello')
|
|
||||||
Hello
|
|
||||||
h=input('Your name=')
|
|
||||||
Your name=Dmitriy
|
|
||||||
exit()
|
|
||||||
```
|
|
||||||
|
|
||||||
## 1.2 Настройка текущего каталога
|
|
||||||
```py
|
|
||||||
>>> import os
|
|
||||||
>>> os.chdir('C:\\Users\\u111-01\\Desktop\\python-labs\\TEMA1\\')
|
|
||||||
```
|
|
||||||
## 1.3 Настройка окна IDLE
|
|
||||||

|
|
||||||
|
|
||||||
## 1.4 Запуск программы
|
|
||||||
```py
|
|
||||||
#Программа по Теме 1 <Антонов Дмитрий Антонович>
|
|
||||||
print('Hello')
|
|
||||||
h=input('Your name=')
|
|
||||||
import os
|
|
||||||
os.chdir('C:\\Users\\u111-01\\Desktop\\python-labs\\TEMA1\\')
|
|
||||||
```
|
|
||||||
## 1.5 Запуск программы через import
|
|
||||||
```py
|
|
||||||
import Pr0
|
|
||||||
Hello
|
|
||||||
Your name=D
|
|
||||||
import prb1
|
|
||||||
Как Вас зовут? D
|
|
||||||
Привет, D
|
|
||||||
```
|
|
||||||
|
|
||||||
## 1.6 Содержимое файла pycache
|
|
||||||

|
|
||||||
|
|
||||||
## 1.7 Изучение раздела помощи
|
|
||||||
```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)
|
|
||||||
```
|
|
||||||
|
|
||||||
## 1.8 Запуск программы из IDLE
|
|
||||||
```py
|
|
||||||
import tdemo_chaos
|
|
||||||
====== RESTART: C:\Users\u111-01\Desktop\python-labs\TEMA1\tdemo_chaos.py ======
|
|
||||||
```
|
|
||||||
|
|
||||||
## 1.9 Изучение примеров
|
|
||||||

|
|
||||||

|
|
||||||

|
|
@ -1,44 +0,0 @@
|
|||||||
# Общее контрольный вопрос по теме 1
|
|
||||||
|
|
||||||
Антонов Дмитрий, А-03-23
|
|
||||||
|
|
||||||
## Вопрос
|
|
||||||
|
|
||||||
В каком месте инструкции можно написать комментарий?
|
|
||||||
|
|
||||||
## Ответ
|
|
||||||
|
|
||||||
Комментарии в python можно вставлять практически в любом месте программы, используя специальный символ - #.
|
|
||||||
Нужно помнить, что после символа # до конца сроки текст будет закомментирован. Поэтому не получится прервать комнаду комметарием.
|
|
||||||
|
|
||||||
|
|
||||||
## Пример:
|
|
||||||
|
|
||||||
```py
|
|
||||||
hel#p()
|
|
||||||
Traceback (most recent call last):
|
|
||||||
File "<pyshell#26>", line 1, in <module>
|
|
||||||
hel#p()
|
|
||||||
NameError: name 'hel' is not defined. Did you mean: 'hex'?
|
|
||||||
```
|
|
||||||
|
|
||||||
```py
|
|
||||||
help()#правильный синтаксис
|
|
||||||
|
|
||||||
Welcome to Python 3.11's help utility!
|
|
||||||
|
|
||||||
If this is your first time using Python, you should definitely check out
|
|
||||||
the tutorial on the internet at https://docs.python.org/3.11/tutorial/.
|
|
||||||
|
|
||||||
Enter the name of any module, keyword, or topic to get help on writing
|
|
||||||
Python programs and using Python modules. To quit this help utility and
|
|
||||||
return to the interpreter, just type "quit".
|
|
||||||
|
|
||||||
To get a list of available modules, keywords, symbols, or topics, type
|
|
||||||
"modules", "keywords", "symbols", or "topics". Each module also comes
|
|
||||||
with a one-line summary of what it does; to list the modules whose name
|
|
||||||
or summary contain a given string such as "spam", type "modules spam".
|
|
||||||
|
|
||||||
help>
|
|
||||||
```
|
|
||||||
|
|