filmov
tv
#2. Getting started with Python interpreter. Learn Python programming. #learnpython #learncoding

Показать описание
## Slide 1
Hey, Monty Pythons!
Let's Get Down and Dirty
With Some :snake: Programming!
Today,
We Will Learn How to Use [Python Interpreter!]
PREREQUISITES:
You Should Have Installed Python on Your Computer,
Or Otherwise Have Access to [Python Interpreter.]
## Slide 2
[The Python Interpreter]
that Comes with the Official Python Distribution
is a Command Line Tool (Or, [CLI]).
You Run the Interpreter
On a Terminal.
There are a Few Different Ways
To Run Python Programs
With the Python Interpreter.
## Slide 3
- First,
The Most Common Way is
To Run a Complete Python
Program Written in a File.
- In this Case, the file,
Contains
The Python Code.
For Example,
print('Hello,')
print('World!')
## Slide 4
- In Some Cases,
You May Prefer Running a Python Code,
Without Saving it to a File First.
- You Can Use the _-c_ Flag
To Do So.
For Example,
python -c \
'print("Hello, World!")'
- This Will Print out
_Hello, World!_
to the Terminal,
and the Python
Interpreter Will Terminate.
Hello, World!
## Slide 5
- We Can Also _Interactively_
Execute a Python Program, Say,
One Statement at a Time.
We Can Start _Python_ without Any Arguments,
python
Or,
We Can Start it with the _-i_ Flag,
python -ic 'print("Hi!")'
- The Python Interpreter Used in Interactive Mode
is Called [Python REPL.]
We Will Discuss this in the Next Lesson.
## Slide 6
Learn :snake: :snake: :snake: Programming
For 60 Seconds a Day!
See You All in the Next Lesson!
Hey, Monty Pythons!
Let's Get Down and Dirty
With Some :snake: Programming!
Today,
We Will Learn How to Use [Python Interpreter!]
PREREQUISITES:
You Should Have Installed Python on Your Computer,
Or Otherwise Have Access to [Python Interpreter.]
## Slide 2
[The Python Interpreter]
that Comes with the Official Python Distribution
is a Command Line Tool (Or, [CLI]).
You Run the Interpreter
On a Terminal.
There are a Few Different Ways
To Run Python Programs
With the Python Interpreter.
## Slide 3
- First,
The Most Common Way is
To Run a Complete Python
Program Written in a File.
- In this Case, the file,
Contains
The Python Code.
For Example,
print('Hello,')
print('World!')
## Slide 4
- In Some Cases,
You May Prefer Running a Python Code,
Without Saving it to a File First.
- You Can Use the _-c_ Flag
To Do So.
For Example,
python -c \
'print("Hello, World!")'
- This Will Print out
_Hello, World!_
to the Terminal,
and the Python
Interpreter Will Terminate.
Hello, World!
## Slide 5
- We Can Also _Interactively_
Execute a Python Program, Say,
One Statement at a Time.
We Can Start _Python_ without Any Arguments,
python
Or,
We Can Start it with the _-i_ Flag,
python -ic 'print("Hi!")'
- The Python Interpreter Used in Interactive Mode
is Called [Python REPL.]
We Will Discuss this in the Next Lesson.
## Slide 6
Learn :snake: :snake: :snake: Programming
For 60 Seconds a Day!
See You All in the Next Lesson!
Комментарии