Instructor: Welcome back.
We just learned what a programming language is.
It's just set of instructions that we give to a translator
and this translator can be an interpreter or a compiler.
And we give these files that we create our own code,
our source code, to these translators
and they allow us to give instructions
to machines, to computers, to phones.
So we learned that we need these machines
in order for us to write Python, right?
How can we get these?
Well, we download them, and here we download Python
from the Python Software Foundation from python.org.
Now, before we download Python,
we're gonna wait a little bit because in this course,
I want you to understand why we're doing things,
not just follow my tutorials, follow my videos
and well, not understand the meaning
and the fundamentals behind why we're doing things.
You should be able to teach what you're going to learn.
So let's take a pause here for a second.
If this is the first time
that you're learning a programming language,
I have some good news for you.
At the end of the day,
all programming languages do the same thing.
They tell the machine what to do.
However, different languages have different ways
of doing it.
The beauty is that most languages
have very similar principles.
If this is your first programming language, well,
this is gonna be the hardest part,
learning the first one.
Afterwards, every new language you learn
becomes easier and easier
in the sense that it's not the same as, let's say,
learning English and Japanese,
two very distinct languages.
In programming, things become a lot easier
as you learn that first foundational language.
Now, if this is not your first language
and let's say you've written code in C, C++ or JavaScript,
and you just wanna learn Python, well,
you're gonna find these first couple of videos quite easy.
But bear with me, trust me, we're gonna get
into some advanced topics here
and we're gonna make you a full-fledged developer
by the end of this.
But let's go back to this topic at hand, this idea
of downloading this translator.
The thing is, when people refer to Python, the language,
they're most likely talking about the implementation.
That is, they're talking not about the language itself
because Python, the language is just a specification.
You can think of it as a document that somebody wrote
that says, "Hey, when I write the words def,
that means something in Python.
And when I write something like print,
that means something in Python."
But the translation machines, well, we can have tons
of them, different interpreters, different compilers.
For example, python.org,
when you click download here,
you're actually downloading this, the CPython
because it's written in the C programming language.
This is what you're downloading.
It's a program written in C to read your Python file
and well, run it on a machine.
But there's other implementations.
For example, there's the Jython Project
and this is a translator that is written
in the Java language.
There's pypy, which is actually written in Python.
So it's a interpreter,
it's a translation machine written in Python.
And then there's also things like IronPython,
which is written for the .NET framework.
So here's a little trick question.
When you download from Python,
the official language is actually CPython.
You're downloading this interpreter
that follows the Python specification,
but at the end of the day,
it's a machine built by somebody.
But these machines can well, come in many forms.
So when most people talk about Python,
they're talking about this one, CPython
that well, does our translation for us.
It interprets our Python code and runs it on our machine.
So we're downloading this, and if you wanna really get
into details as to what we're downloading,
well, we're downloading a machine
that takes our Python code, which don't worry,
we're going to write
and it goes through the interpreter,
which we download using CPython.
And this CPython is going to create something
called a bytecode.
For example, this bytecode prints Hello, World
on our screen.
Now, this might look like gibberish to you,
and even for me, I don't know bytecode.
This looks pretty well, confusing
just for printing Hello, World to the screen.
Well, the interpreter does that automatically for us.
We don't see it, it's behind the scene.
Now, once it creates a bytecode that is closer
to machine code, it then uses the CPython virtual machine,
again just something that runs this code
and then this code gets run on our machine.
Now, you're never ever going to be asked this question
in an interview.
I mean, maybe,
and most developers don't know this
but I want you to use this as a reference
that when we write Python code throughout the rest
of this course, this is what's happening.
We're writing Python, it gets interpreted line by line
and formed into what we call bytecode.
And this bytecode gets run on the CPython virtual machine,
which runs on our computers, our phones, our laptops
and when we're downloading from python.org,
we're downloading these two pieces
so that once we have them downloaded, we can run Python.
All right, that was a tough one, and I mean,
we just got started.
I hope your brain isn't exploding.
Again, this is something for you to use as a reference.
But you know what?
I think it's time for us
to learn how to actually run Python code.
And don't worry, we are getting there.
We are going to write our first Python program very soon.
I'll see you in the next one.
Bye-bye.