1 00:00:00,000 --> 00:00:03,689 And to start with Python, first start the Python 2 00:00:03,689 --> 00:00:06,239 Shell. So if you don't know how to start it, 3 00:00:06,359 --> 00:00:09,389 please go back to the introduction section where 4 00:00:09,389 --> 00:00:12,449 you can see the lesson on how to install Python, 5 00:00:12,719 --> 00:00:17,279 on Windows, on Linux, and on MAC OS, and then come 6 00:00:17,279 --> 00:00:20,579 back here for the explanations. So this is the 7 00:00:20,579 --> 00:00:23,699 Python Shell. And the first thing you can see here 8 00:00:23,699 --> 00:00:26,759 is the Python version you have here. So I have 9 00:00:26,789 --> 00:00:31,139 version 3, Python 3.9. But just the important 10 00:00:31,139 --> 00:00:33,719 thing is that you have Python 3, okay. And 11 00:00:33,719 --> 00:00:36,719 then you're going to see three brackets, three 12 00:00:36,749 --> 00:00:39,209 angled brackets, and that's where you're going to 13 00:00:39,209 --> 00:00:42,629 type some Python instructions. So we will see 14 00:00:42,629 --> 00:00:46,109 later that you can create complete files with lots 15 00:00:46,139 --> 00:00:48,929 of lines of code, which are basically all 16 00:00:48,929 --> 00:00:52,319 instructions that are going to be executed. And 17 00:00:52,409 --> 00:00:55,409 with the Python Shell, instead, you don't write a 18 00:00:55,409 --> 00:00:58,289 complete file, you just write one instruction at a 19 00:00:58,289 --> 00:01:01,559 time, and when you press enter, the instruction is 20 00:01:01,559 --> 00:01:04,979 going to be executed. And in addition to that, the 21 00:01:04,979 --> 00:01:08,819 results of the instruction will also be evaluated 22 00:01:08,879 --> 00:01:13,079 and printed directly on the Shell. So let's just 23 00:01:13,079 --> 00:01:16,319 type anything, let's just type number 3, and 24 00:01:16,319 --> 00:01:19,469 press enter, and you can see now I have here 3. 25 00:01:19,769 --> 00:01:22,349 So that was the instruction, which is just a 26 00:01:22,349 --> 00:01:24,989 number for now. So it doesn't do anything. But you 27 00:01:24,989 --> 00:01:26,789 can see we have the instruction, which is 28 00:01:26,819 --> 00:01:29,819 evaluated, so of course three is evaluated to 29 00:01:29,819 --> 00:01:33,449 3 and is printed here. I can also do 30 00:01:33,569 --> 00:01:38,639 hello world, like this. So use double quotes for 31 00:01:38,639 --> 00:01:42,479 now. Okay, hello world, I press enter, and you 32 00:01:42,479 --> 00:01:46,829 can see hello world. So here you have your first 33 00:01:46,829 --> 00:01:50,009 hello world program in Python. And in this section, 34 00:01:50,009 --> 00:01:52,139 we're going to continue with this Python Shell to 35 00:01:52,139 --> 00:01:55,889 discover variables etc. And so you can just type 36 00:01:56,009 --> 00:01:58,619 literal value like this, and you can also for 37 00:01:58,619 --> 00:02:01,829 example, use Python functions. So there is one 38 00:02:01,829 --> 00:02:04,949 Python function, which is named len for length. 39 00:02:05,309 --> 00:02:08,127 And you have to open and close parentheses and 40 00:02:08,157 --> 00:02:12,179 need to give, for example, a string of characters 41 00:02:12,179 --> 00:02:16,100 like this after this. So if I just type hello, 42 00:02:17,069 --> 00:02:21,299 world like this, here, I press enter. And this as 43 00:02:21,299 --> 00:02:24,719 you can see, this gives us 11. Okay, because this 44 00:02:24,929 --> 00:02:27,569 Python function, which is in the core module in 45 00:02:27,569 --> 00:02:30,839 the core Python module, is going to compute the 46 00:02:30,839 --> 00:02:34,919 length of the string here which is 11. So we have 47 00:02:34,949 --> 00:02:38,489 11 characters, including the space. Okay, and 48 00:02:38,489 --> 00:02:40,229 don't worry about this. We are going to come back 49 00:02:40,229 --> 00:02:43,199 to that just later. Hey, it is just to show you 50 00:02:43,499 --> 00:02:46,049 so what you can do with the Python Shell. So you 51 00:02:46,049 --> 00:02:49,379 can write instructions, you press enter, okay, you 52 00:02:49,379 --> 00:02:52,769 can press enter as you can see here, I press enter 53 00:02:52,949 --> 00:02:56,489 and whatever is here will be executed and also 54 00:02:56,519 --> 00:02:59,669 evaluated and printed here.