форкнуто от main/python-labs
Вы не можете выбрать более 25 тем
Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
3.0 KiB
3.0 KiB
Отчет по теме 1
Махнов Георгий, А-01-23
Тема 1. Знакомство с интерпретатором и интерактивной оболочкой IDLE
2 задание
PS C:\Users\gmack\OneDrive\Рабочий стол\3 KURS\LABS\python-labs\TEMA1> & C:/Users/gmack/AppData/Local/Programs/Python/Python312/python.exe
Python 3.12.0 (tags/v3.12.0:0fb18b0, Oct 2 2023, 13:03:39) [MSC v.1935 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Ctrl click to launch VS Code Native REPL
>>>
3 задание
>>> print('Hello')
Hello
4 задание
>>> h=input('Your name=')
Your name=Gosha
5 задание
>>> exit()
8 задание
import os
os.chdir("C:\\Users\\gmack\\OneDrive\\Рабочий стол\\3 KURS\\LABS\\python-labs\\TEMA1")
10 задание
11 задание
PS C:\Users\gmack\OneDrive\Рабочий стол\3 KURS\LABS\python-labs\TEMA1> python prb0.py
Hello
Как Вас зовут? Gosha
Привет, Gosha
12 задание.
Открыл каталог pycashe, нашел там файл Pr0.cpython-34.pyc После открытия в тектстовом редакторе обнаружил символы - байт-код, который был создан при запуске программы Pr0.py и служит для ускорения повторного запуска программы
14 задание
>>> 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.
15 задание
>>> import prb0
Hello
Как Вас зовут? Gosha
Привет, Gosha
>>> import tdemo_chaos