1 00:00:00,000 --> 00:00:04,000 And to start with Python, first start the Python shell. 2 00:00:04,001 --> 00:00:09,000 So if you don't know how to start it, please go back to the introduction section 3 00:00:09,001 --> 00:00:13,000 where you can see the lesson on how to install 4 00:00:13,001 --> 00:00:16,000 Python on Windows, on Linux, and on Mac OS. 5 00:00:16,001 --> 00:00:19,000 And then come back here for the explanations. 6 00:00:19,001 --> 00:00:24,000 So this is the Python shell, and the first thing you 7 00:00:24,001 --> 00:00:26,000 can see here is the Python version you have here. 8 00:00:26,001 --> 00:00:30,000 So I have version 3, Python 3.9, 9 00:00:30,001 --> 00:00:34,000 but just the important thing is that you have Python 3, okay? 10 00:00:34,001 --> 00:00:38,000 And then you are going to see here three brackets, three angle brackets, 11 00:00:38,001 --> 00:00:42,000 and that's where you are going to type some Python instructions. 12 00:00:42,001 --> 00:00:47,000 So we will see later that you can create complete files with lots of lines of code, 13 00:00:47,001 --> 00:00:52,000 which are basically all instructions that are going to be executed. 14 00:00:52,001 --> 00:00:56,000 And with the Python shell instead, you don't write a complete file, 15 00:00:56,001 --> 00:01:01,000 you just write one instruction at a time, and when you press enter, 16 00:01:01,001 --> 00:01:05,000 the instruction is going to be executed, and in 17 00:01:05,001 --> 00:01:07,000 addition to that, the result of the instruction 18 00:01:07,001 --> 00:01:11,000 will also be evaluated and printed directly on the shell. 19 00:01:11,001 --> 00:01:14,000 So let's just type anything. 20 00:01:14,001 --> 00:01:16,000 Let's just type number 3. 21 00:01:16,001 --> 00:01:20,000 I am going to press enter, and you can see now I have 3 here. 22 00:01:20,001 --> 00:01:23,000 So that was the instruction, which is just a number for now, 23 00:01:23,001 --> 00:01:26,000 so it doesn't do anything, but you can see 24 00:01:26,001 --> 00:01:28,000 we have the instruction, which is evaluated. 25 00:01:28,001 --> 00:01:32,000 So of course, 3 is evaluated to 3, and it's printed here. 26 00:01:32,001 --> 00:01:36,000 I can also do "Hello World" like this. 27 00:01:36,001 --> 00:01:39,000 So use double quotes for now. 28 00:01:39,001 --> 00:01:45,000 Okay, "Hello World", I press enter, and you can see "Hello World". 29 00:01:45,001 --> 00:01:49,000 So here you have your first "Hello World" program in Python. 30 00:01:49,001 --> 00:01:52,000 And in this section, we are going to continue with 31 00:01:52,001 --> 00:01:54,000 this Python shell to discover variables, et cetera. 32 00:01:54,001 --> 00:01:58,000 And so you can just type literal value like this, 33 00:01:58,001 --> 00:02:01,000 and you can also, for example, use Python functions. 34 00:02:01,001 --> 00:02:05,000 So there is one Python function, which is named len for length, 35 00:02:05,001 --> 00:02:10,000 and you have to open and close parentheses and need to give, 36 00:02:10,001 --> 00:02:14,000 for example, a string of characters like this or a list. 37 00:02:14,001 --> 00:02:20,000 So if I just type "Hello World" like this, here I press enter, 38 00:02:20,001 --> 00:02:26,000 and this, as you can see, this gives us 11, because this Python function, 39 00:02:26,001 --> 00:02:30,000 which is in the core module, in the core Python module, 40 00:02:30,001 --> 00:02:34,000 is going to compute the length of the string here, which is 11. 41 00:02:34,001 --> 00:02:38,000 So we have 11 characters, including the space. 42 00:02:38,001 --> 00:02:39,000 Okay, and don't worry about this. 43 00:02:39,001 --> 00:02:42,000 We are going to come back to that just later. 44 00:02:42,001 --> 00:02:46,000 Here it will just show you what you can do with the Python shell. 45 00:02:46,001 --> 00:02:48,000 So you can write instructions. 46 00:02:48,001 --> 00:02:52,000 You press enter, okay, you can press enter, as you can see here. 47 00:02:52,001 --> 00:02:54,000 I press enter, and whatever is here 48 00:02:54,001 --> 00:02:59,000 will be executed and also evaluated and printed here.