1 00:00:00,000 --> 00:00:02,570 [No audio] 2 00:00:02,571 --> 00:00:04,948 Before we go into coding, I want to 3 00:00:04,949 --> 00:00:09,170 show you a productivity tip regarding the IDE. 4 00:00:09,171 --> 00:00:13,396 Now, this tip is about Visual Studio Code IDE, but 5 00:00:13,397 --> 00:00:19,204 it will probably apply to other IDEs as well. 6 00:00:19,205 --> 00:00:20,788 It's about the terminal, how to 7 00:00:20,789 --> 00:00:22,730 use the terminal more efficiently. 8 00:00:22,731 --> 00:00:25,210 And this will help you with coding 9 00:00:25,211 --> 00:00:27,852 and also with the learning part. 10 00:00:27,853 --> 00:00:29,880 So this is what I want to show you. 11 00:00:31,290 --> 00:00:33,372 I have my terminal open here. 12 00:00:33,373 --> 00:00:35,852 So first of all, what I want to do is 13 00:00:35,853 --> 00:00:39,702 I want to delete all the terminals using that icon, 14 00:00:39,703 --> 00:00:41,760 or the icon could be somewhere in here. 15 00:00:41,761 --> 00:00:43,712 So just delete everything. 16 00:00:43,713 --> 00:00:45,248 Yeah, the icon shows here. 17 00:00:45,249 --> 00:00:47,248 Now press that or the other 18 00:00:47,249 --> 00:00:50,090 one, until the terminal disappears. 19 00:00:50,990 --> 00:00:53,716 And then you want to show the terminal again, 20 00:00:53,717 --> 00:00:56,240 and you can do that by pressing this button. 21 00:00:57,330 --> 00:00:58,996 So that will execute the code. 22 00:00:58,997 --> 00:01:04,312 It will create a new terminal window, and then it's good 23 00:01:04,313 --> 00:01:08,728 to have a Python shell open on the side as well. 24 00:01:08,729 --> 00:01:11,592 So you have both the command line where you 25 00:01:11,593 --> 00:01:15,278 run the code, but also the Python Interactive shell 26 00:01:15,279 --> 00:01:18,546 where you can write quick one liners. 27 00:01:18,547 --> 00:01:20,396 So to do that, you want to press 28 00:01:20,397 --> 00:01:24,530 this icon, and that will split the terminal. 29 00:01:24,531 --> 00:01:26,908 So now we have one terminal here on the 30 00:01:26,909 --> 00:01:29,148 left, and one terminal here on the right. 31 00:01:29,149 --> 00:01:32,048 Here on the right, what we want to do is execute the 32 00:01:32,049 --> 00:01:35,126 Python command, which opens the Python Interactive shell. 33 00:01:35,127 --> 00:01:38,928 On Windows, that is py -3. 34 00:01:38,929 --> 00:01:42,289 On Mac and Linux, that would be Python 3.10 35 00:01:42,290 --> 00:01:44,560 or Python 3.11 and so on. 36 00:01:46,290 --> 00:01:49,550 So that will open the Python Interactive shell. 37 00:01:50,130 --> 00:01:52,596 Now we have both the command line 38 00:01:52,597 --> 00:01:56,568 where we execute .py files, and the 39 00:01:56,569 --> 00:02:01,250 Python shell where you run code interactively. 40 00:02:02,630 --> 00:02:04,552 That will help with your learning. 41 00:02:04,553 --> 00:02:06,728 So let me quickly demonstrate you if 42 00:02:06,729 --> 00:02:08,283 this is working fine or not. 43 00:02:08,284 --> 00:02:11,532 So I can have the focus in here, it 44 00:02:11,533 --> 00:02:14,492 doesn't matter, and I press that button, but the 45 00:02:14,493 --> 00:02:18,720 code will be sent to that terminal, and this 46 00:02:18,721 --> 00:02:21,420 terminal here is independent of that. 47 00:02:22,750 --> 00:02:24,864 So again, if this is not working, 48 00:02:24,865 --> 00:02:28,272 make sure again to delete everything. 49 00:02:28,273 --> 00:02:32,260 So no terminals, and then don't open a terminal here. 50 00:02:32,261 --> 00:02:34,388 So instead of doing that, let the 51 00:02:34,389 --> 00:02:36,960 terminal be opened using that button. 52 00:02:37,730 --> 00:02:40,522 That way you make sure that this terminal 53 00:02:40,523 --> 00:02:43,736 is connected to the running process of this 54 00:02:43,737 --> 00:02:47,272 file, and then you split the terminal, and 55 00:02:47,273 --> 00:02:51,170 then you have that command to open Python. 56 00:02:52,150 --> 00:02:54,980 Another tip before we close this video, 57 00:02:55,530 --> 00:02:58,146 on the command line where the Windows 58 00:02:58,147 --> 00:03:01,340 or Mac or Linux commands are sent. 59 00:03:01,341 --> 00:03:03,666 So in here, when we run the .py 60 00:03:03,667 --> 00:03:08,630 file, you can clear the terminal using clc. 61 00:03:08,631 --> 00:03:12,768 So write clc there, if you are on Windows. On Mac, it 62 00:03:12,769 --> 00:03:15,872 would be clear or Linux as well. 63 00:03:15,873 --> 00:03:20,694 So CLC press Enter and that will clear the terminal. 64 00:03:20,695 --> 00:03:23,978 So this works on the command 65 00:03:23,979 --> 00:03:26,110 line, not on the Python shell. 66 00:03:26,690 --> 00:03:30,388 Regarding the split window here on the side, you 67 00:03:30,389 --> 00:03:34,276 can see how many terminal panes you have. 68 00:03:34,277 --> 00:03:38,296 So we have this, which is pointing to this on the side, 69 00:03:38,297 --> 00:03:41,940 on the left side, and then the other one on the right. 70 00:03:42,470 --> 00:03:45,352 I would suggest try not to have more than 71 00:03:45,353 --> 00:03:48,888 two terminals here because things can get confusing because 72 00:03:48,889 --> 00:03:50,828 if you press that plus icon, you're going to 73 00:03:50,829 --> 00:03:52,828 have a third terminal which is going to be 74 00:03:52,829 --> 00:03:55,762 hidden behind these two and things will get confusing. 75 00:03:55,763 --> 00:03:58,748 So make sure you always have two. 76 00:03:58,749 --> 00:04:00,460 If you have more, delete everything 77 00:04:00,461 --> 00:04:04,124 and start the process again. Run it. 78 00:04:04,125 --> 00:04:07,212 Run py -3 again and so on. 79 00:04:07,213 --> 00:04:08,940 So with that, you're ready to 80 00:04:08,941 --> 00:04:11,200 program in the next videos. 81 00:04:11,730 --> 00:04:15,700 This will really, really help you with your learning. 82 00:04:15,701 --> 00:04:17,200 So I'll talk to you in the next video.