1
00:00:01,380 --> 00:00:02,460
Instructor: Welcome back.

2
00:00:02,460 --> 00:00:06,030
We just learned what a programming language is.

3
00:00:06,030 --> 00:00:11,030
It's just set of instructions that we give to a translator

4
00:00:11,220 --> 00:00:15,120
and this translator can be an interpreter or a compiler.

5
00:00:15,120 --> 00:00:18,870
And we give these files that we create our own code,

6
00:00:18,870 --> 00:00:22,500
our source code, to these translators

7
00:00:22,500 --> 00:00:25,560
and they allow us to give instructions

8
00:00:25,560 --> 00:00:28,440
to machines, to computers, to phones.

9
00:00:28,440 --> 00:00:32,369
So we learned that we need these machines

10
00:00:32,369 --> 00:00:36,630
in order for us to write Python, right?

11
00:00:36,630 --> 00:00:38,400
How can we get these?

12
00:00:38,400 --> 00:00:42,300
Well, we download them, and here we download Python

13
00:00:42,300 --> 00:00:46,683
from the Python Software Foundation from python.org.

14
00:00:47,610 --> 00:00:50,940
Now, before we download Python,

15
00:00:50,940 --> 00:00:53,910
we're gonna wait a little bit because in this course,

16
00:00:53,910 --> 00:00:56,760
I want you to understand why we're doing things,

17
00:00:56,760 --> 00:01:00,210
not just follow my tutorials, follow my videos

18
00:01:00,210 --> 00:01:04,080
and well, not understand the meaning

19
00:01:04,080 --> 00:01:06,750
and the fundamentals behind why we're doing things.

20
00:01:06,750 --> 00:01:10,860
You should be able to teach what you're going to learn.

21
00:01:10,860 --> 00:01:12,993
So let's take a pause here for a second.

22
00:01:13,860 --> 00:01:16,110
If this is the first time

23
00:01:16,110 --> 00:01:19,230
that you're learning a programming language,

24
00:01:19,230 --> 00:01:21,330
I have some good news for you.

25
00:01:21,330 --> 00:01:22,740
At the end of the day,

26
00:01:22,740 --> 00:01:26,130
all programming languages do the same thing.

27
00:01:26,130 --> 00:01:28,410
They tell the machine what to do.

28
00:01:28,410 --> 00:01:30,600
However, different languages have different ways

29
00:01:30,600 --> 00:01:32,460
of doing it.

30
00:01:32,460 --> 00:01:34,800
The beauty is that most languages

31
00:01:34,800 --> 00:01:36,903
have very similar principles.

32
00:01:37,770 --> 00:01:40,890
If this is your first programming language, well,

33
00:01:40,890 --> 00:01:42,510
this is gonna be the hardest part,

34
00:01:42,510 --> 00:01:44,760
learning the first one.

35
00:01:44,760 --> 00:01:48,090
Afterwards, every new language you learn

36
00:01:48,090 --> 00:01:50,490
becomes easier and easier

37
00:01:50,490 --> 00:01:52,830
in the sense that it's not the same as, let's say,

38
00:01:52,830 --> 00:01:55,140
learning English and Japanese,

39
00:01:55,140 --> 00:01:57,240
two very distinct languages.

40
00:01:57,240 --> 00:02:00,210
In programming, things become a lot easier

41
00:02:00,210 --> 00:02:03,930
as you learn that first foundational language.

42
00:02:03,930 --> 00:02:06,360
Now, if this is not your first language

43
00:02:06,360 --> 00:02:11,280
and let's say you've written code in C, C++ or JavaScript,

44
00:02:11,280 --> 00:02:13,650
and you just wanna learn Python, well,

45
00:02:13,650 --> 00:02:16,830
you're gonna find these first couple of videos quite easy.

46
00:02:16,830 --> 00:02:19,140
But bear with me, trust me, we're gonna get

47
00:02:19,140 --> 00:02:21,060
into some advanced topics here

48
00:02:21,060 --> 00:02:23,430
and we're gonna make you a full-fledged developer

49
00:02:23,430 --> 00:02:24,570
by the end of this.

50
00:02:24,570 --> 00:02:27,210
But let's go back to this topic at hand, this idea

51
00:02:27,210 --> 00:02:29,940
of downloading this translator.

52
00:02:29,940 --> 00:02:34,680
The thing is, when people refer to Python, the language,

53
00:02:34,680 --> 00:02:38,490
they're most likely talking about the implementation.

54
00:02:38,490 --> 00:02:41,910
That is, they're talking not about the language itself

55
00:02:41,910 --> 00:02:45,540
because Python, the language is just a specification.

56
00:02:45,540 --> 00:02:48,270
You can think of it as a document that somebody wrote

57
00:02:48,270 --> 00:02:51,600
that says, "Hey, when I write the words def,

58
00:02:51,600 --> 00:02:53,730
that means something in Python.

59
00:02:53,730 --> 00:02:56,070
And when I write something like print,

60
00:02:56,070 --> 00:02:58,500
that means something in Python."

61
00:02:58,500 --> 00:03:03,270
But the translation machines, well, we can have tons

62
00:03:03,270 --> 00:03:07,770
of them, different interpreters, different compilers.

63
00:03:07,770 --> 00:03:10,590
For example, python.org,

64
00:03:10,590 --> 00:03:12,930
when you click download here,

65
00:03:12,930 --> 00:03:17,730
you're actually downloading this, the CPython

66
00:03:17,730 --> 00:03:21,690
because it's written in the C programming language.

67
00:03:21,690 --> 00:03:23,523
This is what you're downloading.

68
00:03:24,720 --> 00:03:29,720
It's a program written in C to read your Python file

69
00:03:30,150 --> 00:03:33,423
and well, run it on a machine.

70
00:03:34,770 --> 00:03:37,200
But there's other implementations.

71
00:03:37,200 --> 00:03:40,530
For example, there's the Jython Project

72
00:03:40,530 --> 00:03:43,500
and this is a translator that is written

73
00:03:43,500 --> 00:03:45,303
in the Java language.

74
00:03:46,230 --> 00:03:51,230
There's pypy, which is actually written in Python.

75
00:03:51,990 --> 00:03:53,580
So it's a interpreter,

76
00:03:53,580 --> 00:03:57,300
it's a translation machine written in Python.

77
00:03:57,300 --> 00:04:00,240
And then there's also things like IronPython,

78
00:04:00,240 --> 00:04:04,770
which is written for the .NET framework.

79
00:04:04,770 --> 00:04:07,230
So here's a little trick question.

80
00:04:07,230 --> 00:04:10,170
When you download from Python,

81
00:04:10,170 --> 00:04:15,170
the official language is actually CPython.

82
00:04:15,510 --> 00:04:18,149
You're downloading this interpreter

83
00:04:18,149 --> 00:04:22,050
that follows the Python specification,

84
00:04:22,050 --> 00:04:23,190
but at the end of the day,

85
00:04:23,190 --> 00:04:26,580
it's a machine built by somebody.

86
00:04:26,580 --> 00:04:29,910
But these machines can well, come in many forms.

87
00:04:29,910 --> 00:04:32,400
So when most people talk about Python,

88
00:04:32,400 --> 00:04:35,460
they're talking about this one, CPython

89
00:04:35,460 --> 00:04:39,180
that well, does our translation for us.

90
00:04:39,180 --> 00:04:44,180
It interprets our Python code and runs it on our machine.

91
00:04:46,470 --> 00:04:50,670
So we're downloading this, and if you wanna really get

92
00:04:50,670 --> 00:04:53,190
into details as to what we're downloading,

93
00:04:53,190 --> 00:04:54,810
well, we're downloading a machine

94
00:04:54,810 --> 00:04:57,540
that takes our Python code, which don't worry,

95
00:04:57,540 --> 00:04:59,100
we're going to write

96
00:04:59,100 --> 00:05:01,890
and it goes through the interpreter,

97
00:05:01,890 --> 00:05:04,410
which we download using CPython.

98
00:05:04,410 --> 00:05:09,000
And this CPython is going to create something

99
00:05:09,000 --> 00:05:11,220
called a bytecode.

100
00:05:11,220 --> 00:05:15,600
For example, this bytecode prints Hello, World

101
00:05:15,600 --> 00:05:16,473
on our screen.

102
00:05:18,240 --> 00:05:21,120
Now, this might look like gibberish to you,

103
00:05:21,120 --> 00:05:23,640
and even for me, I don't know bytecode.

104
00:05:23,640 --> 00:05:25,830
This looks pretty well, confusing

105
00:05:25,830 --> 00:05:28,263
just for printing Hello, World to the screen.

106
00:05:29,190 --> 00:05:32,730
Well, the interpreter does that automatically for us.

107
00:05:32,730 --> 00:05:35,310
We don't see it, it's behind the scene.

108
00:05:35,310 --> 00:05:38,310
Now, once it creates a bytecode that is closer

109
00:05:38,310 --> 00:05:43,310
to machine code, it then uses the CPython virtual machine,

110
00:05:44,550 --> 00:05:48,000
again just something that runs this code

111
00:05:48,000 --> 00:05:53,000
and then this code gets run on our machine.

112
00:05:53,340 --> 00:05:56,520
Now, you're never ever going to be asked this question

113
00:05:56,520 --> 00:05:57,390
in an interview.

114
00:05:57,390 --> 00:05:58,620
I mean, maybe,

115
00:05:58,620 --> 00:06:00,870
and most developers don't know this

116
00:06:00,870 --> 00:06:03,510
but I want you to use this as a reference

117
00:06:03,510 --> 00:06:07,200
that when we write Python code throughout the rest

118
00:06:07,200 --> 00:06:10,380
of this course, this is what's happening.

119
00:06:10,380 --> 00:06:15,380
We're writing Python, it gets interpreted line by line

120
00:06:16,440 --> 00:06:20,490
and formed into what we call bytecode.

121
00:06:20,490 --> 00:06:24,810
And this bytecode gets run on the CPython virtual machine,

122
00:06:24,810 --> 00:06:29,490
which runs on our computers, our phones, our laptops

123
00:06:29,490 --> 00:06:32,190
and when we're downloading from python.org,

124
00:06:32,190 --> 00:06:35,100
we're downloading these two pieces

125
00:06:35,100 --> 00:06:39,183
so that once we have them downloaded, we can run Python.

126
00:06:40,290 --> 00:06:43,260
All right, that was a tough one, and I mean,

127
00:06:43,260 --> 00:06:44,370
we just got started.

128
00:06:44,370 --> 00:06:46,920
I hope your brain isn't exploding.

129
00:06:46,920 --> 00:06:50,130
Again, this is something for you to use as a reference.

130
00:06:50,130 --> 00:06:51,210
But you know what?

131
00:06:51,210 --> 00:06:52,320
I think it's time for us

132
00:06:52,320 --> 00:06:55,320
to learn how to actually run Python code.

133
00:06:55,320 --> 00:06:57,180
And don't worry, we are getting there.

134
00:06:57,180 --> 00:07:01,380
We are going to write our first Python program very soon.

135
00:07:01,380 --> 00:07:03,060
I'll see you in the next one.

136
00:07:03,060 --> 00:07:03,893
Bye-bye.

