1 00:00:00,580 --> 00:00:06,040 Hello guys and welcome back to another class of our course the complete introduction to Python. 2 00:00:06,850 --> 00:00:11,320 So in today's class we are going to learn how programming works. 3 00:00:11,320 --> 00:00:17,880 Well once again my goal here is really to just present to the basics and well how what is the logic 4 00:00:18,930 --> 00:00:20,610 behind that programming. 5 00:00:20,610 --> 00:00:25,360 And we will play by creating some phrases that will. 6 00:00:25,860 --> 00:00:28,560 Well we'll write them down and we'll change orders. 7 00:00:28,580 --> 00:00:34,140 So I'll explain you how it's how some aspects are important. 8 00:00:34,140 --> 00:00:42,180 So basically how all this works well how Python works as I explain the first part right here is where 9 00:00:42,270 --> 00:00:44,520 you write down your code. 10 00:00:44,550 --> 00:00:47,400 So let's say for example I write down print 11 00:00:51,180 --> 00:01:00,110 and in this case I still write down my basic program which is the world and I run this program. 12 00:01:00,140 --> 00:01:00,420 All right. 13 00:01:00,480 --> 00:01:06,420 So as I explained in the course before the first part right here is where I will write down my code. 14 00:01:06,750 --> 00:01:09,320 And here is the answer to my code. 15 00:01:09,360 --> 00:01:11,290 So let's say for example here. 16 00:01:11,430 --> 00:01:18,480 Well my my goal here when I'm writing when I'm writing down something is simply to send the computer 17 00:01:18,660 --> 00:01:22,470 instruction to what exactly the computer will have to. 18 00:01:22,470 --> 00:01:28,050 So for example right here I'm sending the instruction to the computer to print and the computer will 19 00:01:28,050 --> 00:01:32,250 simply generate me that hello world right there. 20 00:01:32,250 --> 00:01:39,310 So if I asked for example the computer to make an addition or subtraction and multiplication or division. 21 00:01:39,510 --> 00:01:45,320 Well the computer will do this right here and it will generate me the answer right there. 22 00:01:45,390 --> 00:01:52,420 So the more complex the well the computer will answer to those tests basic. 23 00:01:52,440 --> 00:01:57,570 They look like this and the more complex the tasks are the more time it is going to take the computer 24 00:01:57,570 --> 00:01:58,550 to complete them. 25 00:01:58,650 --> 00:02:05,220 But at the end the computer is simply completing the tasks that we ask him to do. 26 00:02:05,220 --> 00:02:06,600 So this is the conceptual. 27 00:02:06,630 --> 00:02:09,810 This is the huge concept of programming. 28 00:02:09,810 --> 00:02:12,820 It's simply giving the computer tasks to complete. 29 00:02:12,840 --> 00:02:19,260 So let's say for example I want to insert complex program a problem so I will create a program that 30 00:02:19,260 --> 00:02:25,860 will answer to dos that that will give a solution to this problem. 31 00:02:26,250 --> 00:02:28,980 And then the computer will simply give me the answer. 32 00:02:28,980 --> 00:02:33,120 For example I am creating a program that will do accounting. 33 00:02:33,120 --> 00:02:34,200 After that I will. 34 00:02:34,230 --> 00:02:36,370 The computer will ask me to enter my. 35 00:02:36,570 --> 00:02:43,560 Let's say for example once again will ask me to enter my variable so the numbers that I want that count. 36 00:02:43,650 --> 00:02:48,090 So in the case let's say for example I want to do accounting for a business I will enter all the accounting 37 00:02:48,090 --> 00:02:52,080 numbers of this business and the computer will generate me the answer. 38 00:02:52,350 --> 00:02:57,660 So the answer that I'm looking for let's say is the income of this business or the value of this business 39 00:02:57,750 --> 00:03:00,150 or whatever answer I'm looking for. 40 00:03:00,150 --> 00:03:08,450 So as I explain the goal here is really to well is really to write down instructions to the computer. 41 00:03:08,460 --> 00:03:08,800 All right. 42 00:03:08,820 --> 00:03:13,440 So how we are going to understand how all this works. 43 00:03:13,440 --> 00:03:14,490 So it's very simple. 44 00:03:14,490 --> 00:03:19,190 We will create some phrases and you'll see why. 45 00:03:19,980 --> 00:03:21,810 There are some aspects that are important. 46 00:03:21,810 --> 00:03:27,460 The first aspect that is there is very important is the order in which you write down your functions. 47 00:03:27,520 --> 00:03:34,760 Let's say for example you take your first function which is hello and instead of writing down HELLO 48 00:03:34,760 --> 00:03:38,090 YOU WRITE DOWN HELLO MY NAME 49 00:03:42,750 --> 00:03:43,260 IS 50 00:03:48,030 --> 00:03:48,600 SOMEONE 51 00:03:53,020 --> 00:03:53,530 All right. 52 00:03:53,630 --> 00:03:55,070 So right now what do we have. 53 00:03:55,070 --> 00:03:57,070 We have four different words. 54 00:03:57,230 --> 00:04:00,440 So if we run this up once again. 55 00:04:00,560 --> 00:04:03,800 Hello my name is someone is the answer to this quote. 56 00:04:03,800 --> 00:04:09,130 So once again I created my app so as you can see my app is very simple. 57 00:04:09,320 --> 00:04:13,740 What it does is simply generates those words right now. 58 00:04:13,830 --> 00:04:17,940 The order that I write down my code is very very important. 59 00:04:17,970 --> 00:04:24,300 This could be for simple codes as right here for example where I'm just generating words and I'm asking 60 00:04:24,300 --> 00:04:30,150 Python to generate me words or for more advanced codes where I need to do some advanced calculations 61 00:04:30,180 --> 00:04:37,120 or enter variables or will identify variables or anything more complicated. 62 00:04:37,250 --> 00:04:39,970 So as I explain the order is important why. 63 00:04:39,980 --> 00:04:44,960 Because let's say for example we take our first line of code and instead of putting it at the end we'd 64 00:04:44,960 --> 00:04:46,010 put it at the beginning 65 00:04:50,360 --> 00:04:58,970 and delete our last line of code as you can see the answer will not be the same because instead of having 66 00:04:59,000 --> 00:05:00,440 Hello my name is someone. 67 00:05:00,530 --> 00:05:02,740 Well right now my answer is someone. 68 00:05:02,840 --> 00:05:06,220 Hello my name is which doesn't make sense at all. 69 00:05:06,230 --> 00:05:14,990 So as you can see if my order changes this means the order of the instructions that I'm giving to the 70 00:05:14,990 --> 00:05:16,890 computer will change as well. 71 00:05:17,330 --> 00:05:20,800 So at the end I will not have the same answer. 72 00:05:21,290 --> 00:05:29,770 If I give you guys a more life life life example let's say for example you are doing it pizza. 73 00:05:30,050 --> 00:05:32,660 You can beg the pizza before cooking the pizza. 74 00:05:32,930 --> 00:05:39,550 So this is the exact same thing for four let's say our bite on exercise right now. 75 00:05:39,710 --> 00:05:41,550 If let's say my last. 76 00:05:41,840 --> 00:05:49,760 If someone is in this case cooking the pizza I can't put cooking the pizza at the beginning once again 77 00:05:49,760 --> 00:05:51,110 that's just an example. 78 00:05:52,460 --> 00:05:54,830 So this is why the order is very very important. 79 00:05:55,250 --> 00:06:01,340 So that's my goal for this course as I explained that let me summarize the goal with those. 80 00:06:01,410 --> 00:06:08,920 That's this basic app was just to show you that first of all the order is important. 81 00:06:08,920 --> 00:06:16,240 Secondly how Python works is this well how Python works is simply giving orders to a computer and the 82 00:06:16,240 --> 00:06:17,970 computer gives you the answer. 83 00:06:18,010 --> 00:06:23,170 So you write down your orders right here and you receive your answer down here. 84 00:06:23,170 --> 00:06:29,890 So this is really really really the basics basic basics of programming not only for python but for bruv 85 00:06:30,180 --> 00:06:32,670 for programming as well in any language. 86 00:06:32,680 --> 00:06:37,240 The only thing that you guys do you simply sent or there is that a computer and the computer will insert 87 00:06:37,450 --> 00:06:39,580 those orders with an answer. 88 00:06:39,610 --> 00:06:43,260 So in this case my answer is Hello my name is someone. 89 00:06:43,470 --> 00:06:44,940 So that's it for this class guys. 90 00:06:44,950 --> 00:06:46,930 And see in our next class.