GoloshchapovDY 18 часов назад
Родитель 9e7891884a
Сommit de0eb4286b

@ -13,19 +13,23 @@
# Пункт 3 Введение пробных команд # Пункт 3 Введение пробных команд
print("hello") print("hello")
hello
hello
# Пункт 4 Вводим еще одну инструкцию # Пункт 4 Вводим еще одну инструкцию
h = input('Your name = ') h = input('Your name = ')
Your name = Dima
h Your name = Dima
'Dima'
h
'Dima'
# Пункт 5 Завершение работы интерпретатора # Пункт 5 Завершение работы интерпретатора
exit() exit()
# Пункты 6-7 # Пункты 6-7
@ -35,6 +39,7 @@ exit()
# Пункт 8 Настройка рабочего каталога # Пункт 8 Настройка рабочего каталога
import os import os
os.chdir('C:\\Users\\Дмитрий\\OneDrive\\Рабочий стол\\Goloshchapov\\python-labs\\TEMA1') os.chdir('C:\\Users\\Дмитрий\\OneDrive\\Рабочий стол\\Goloshchapov\\python-labs\\TEMA1')
# Пункт 9 Настройки(Options) # Пункт 9 Настройки(Options)
@ -49,44 +54,54 @@ exit()
#Программа по теме 1 <Голощапов Дмитрий Евгеньевич> #Программа по теме 1 <Голощапов Дмитрий Евгеньевич>
print('Hello') print('Hello')
h=input('Your name=') h=input('Your name=')
import os import os
os.chdir('C:\\Users\\Дмитрий\\OneDrive\\Рабочий стол\\Goloshchapov\\python-labs\\TEMA1') os.chdir('C:\\Users\\Дмитрий\\OneDrive\\Рабочий стол\\Goloshchapov\\python-labs\\TEMA1')
Она делает следующий вывод: Она делает следующий вывод:
======= RESTART: C:\Users\Дмитрий\OneDrive\Рабочий стол\Goloshchapov\python-labs\TEMA1\Pr0.py ====== ======= RESTART: C:\Users\Дмитрий\OneDrive\Рабочий стол\Goloshchapov\python-labs\TEMA1\Pr0.py ======
Hello
Your name= Hello
Your name=
Другой вариант запуска: Другой вариант запуска:
import Pr0 import Pr0
hello
hello Your name =
Your name =
При нажатии f5 в активном окне редактора: При нажатии f5 в активном окне редактора:
======= RESTART: C:\Users\Дмитрий\OneDrive\Рабочий стол\Goloshchapov\python-labs\TEMA1\Pr0.py ====== ======= RESTART: C:\Users\Дмитрий\OneDrive\Рабочий стол\Goloshchapov\python-labs\TEMA1\Pr0.py ======
hello
Your name = hello
Your name =
# Пункт 11 Запуск программы из рабочего каталога # Пункт 11 Запуск программы из рабочего каталога
Из консоли вызван файл prb1.py Из консоли вызван файл prb1.py
import prb1 import prb1
Как Вас зовут? Dima
Как Вас зовут? Dima Привет, Dima
Привет, Dima
# Пункт 12 Изучение рабочего каталога # Пункт 12 Изучение рабочего каталога
Файл Pr0.cpython-310.pyc открыт в Блокноте. Файл Pr0.cpython-310.pyc открыт в Блокноте.
o
o
ЛFёhэ г  @ s& e d ѓ edѓZddlZe dЎ dS )ZHelloz ЛFёhэ г  @ s& e d ѓ edѓZddlZe dЎ dS )ZHelloz
Your name=й NuW C:\Users\Дмитрий\OneDrive\Рабочий стол\Goloshchapov\python-labs\TEMA1)ЪprintЪinputЪosЪchdir© r r х^ C:\Users\Дмитрий\OneDrive\Рабочий стол\Goloshchapov\python-labs\TEMA1\Pr0.pyЪ<module> s  Your name=й NuW C:\Users\Дмитрий\OneDrive\Рабочий стол\Goloshchapov\python-labs\TEMA1)ЪprintЪinputЪosЪchdir© r r х^ C:\Users\Дмитрий\OneDrive\Рабочий стол\Goloshchapov\python-labs\TEMA1\Pr0.pyЪ<module> s 
Видно, что рeзультат компиляции тяжел для восприятия человеком, вероятно, из-за Видно, что рeзультат компиляции тяжел для восприятия человеком, вероятно, из-за
несоответствия кодировок. Комплиляция программ необходима, чтобы несоответствия кодировок. Комплиляция программ необходима, чтобы
@ -111,13 +126,14 @@ Python Docs - документация по языку
Turtle Demo - окно работы и помощь модуля для работы с графикой turtle Turtle Demo - окно работы и помощь модуля для работы с графикой turtle
Проверка команды: Проверка команд:
help (print)
Help on built-in function print in module builtins: help (print)
print(...)
print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False)
Help on built-in function print in module builtins:
print(...)
print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False)
Prints the values to a stream, or to sys.stdout by default. Prints the values to a stream, or to sys.stdout by default.
Optional keyword arguments: Optional keyword arguments:
file: a file-like object (stream); defaults to the current sys.stdout. file: a file-like object (stream); defaults to the current sys.stdout.
@ -125,13 +141,12 @@ print(...)
end: string appended after the last value, default a newline. end: string appended after the last value, default a newline.
flush: whether to forcibly flush the stream. flush: whether to forcibly flush the stream.
help(print), help(input) help(print), help(input)
Help on built-in function print in module builtins: Help on built-in function print in module builtins:
print(...) print(...)
print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False) print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False)
Prints the values to a stream, or to sys.stdout by default. Prints the values to a stream, or to sys.stdout by default.
Optional keyword arguments: Optional keyword arguments:
file: a file-like object (stream); defaults to the current sys.stdout. file: a file-like object (stream); defaults to the current sys.stdout.
@ -139,18 +154,16 @@ print(...)
end: string appended after the last value, default a newline. end: string appended after the last value, default a newline.
flush: whether to forcibly flush the stream. flush: whether to forcibly flush the stream.
Help on built-in function input in module builtins: Help on built-in function input in module builtins:
input(prompt=None, /) input(prompt=None, /)
Read a string from standard input. The trailing newline is stripped. Read a string from standard input. The trailing newline is stripped.
The prompt string, if given, is printed to standard output without a The prompt string, if given, is printed to standard output without a
trailing newline before reading input. trailing newline before reading input.
If the user hits EOF (*nix: Ctrl-D, Windows: Ctrl-Z+Return), raise EOFError. If the user hits EOF (*nix: Ctrl-D, Windows: Ctrl-Z+Return), raise EOFError.
On *nix systems, readline is used if available. On *nix systems, readline is used if available.
(None, None) (None, None)
F1 -> Указатель -> print() (built-in function) выводит справку по этой F1 -> Указатель -> print() (built-in function) выводит справку по этой
функции функции
@ -163,17 +176,17 @@ File - Open - prb1.py
С помощью Window можно переключаться между всеми открытыми окнами С помощью Window можно переключаться между всеми открытыми окнами
prb1.py - Run prb1.py - Run
====== RESTART: C:\Users\Дмитрий\OneDrive\Рабочий стол\Goloshchapov\python-labs\TEMA1\prb1.py ====== ====== RESTART: C:\Users\Дмитрий\OneDrive\Рабочий стол\Goloshchapov\python-labs\TEMA1\prb1.py ======
Как Вас зовут? Dima Как Вас зовут? Dima
Привет, Dima Привет, Dima
import tdemo_chaos import tdemo_chaos
Help - Turtle Demo - clock - Start выводит на экран графическое представление Help - Turtle Demo - clock - Start выводит на экран графическое представление
программы - циферблат с часами. Есть и другие примеры программ модуля turtle, программы - циферблат с часами. Есть и другие примеры программ модуля turtle,
которые можно брать за основу собственных программ, изменять или реализовывать которые можно брать за основу собственных программ, изменять или реализовывать
свои идеи. свои идеи.
16. Завершена работа со средой: File - exit # Пункт 16. Завершена работа со средой: File - exit
Загрузка…
Отмена
Сохранить