Изменил(а) на 'TEMA1/test.md'

main
AntonovDAn 2 недель назад коммит произвёл Дмитрий Антонов
Родитель ef92cbf3c3
Сommit d5a87e155b

@ -8,6 +8,39 @@
## Ответ
Комментарии в python можно вставлять в любом месте программы, используя специальный символ - #.
Комментарии в 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'?
hel'''333'''p()
SyntaxError: invalid syntax
```
```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>
```

Загрузка…
Отмена
Сохранить