WEBVTT 00:00.510 --> 00:04.580 Become bad guys on this field do let us understand about print statement. 00:04.580 --> 00:08.870 So it is really important for us to understand how we could do it on paper. 00:09.180 --> 00:16.530 So sort of I think the easiest example and let me print Hello I'm so happy with this statement only. 00:16.530 --> 00:19.740 There are a lot of hidden things and we need to understand that. 00:19.920 --> 00:23.790 So for now it is just print and or one and discuss more. 00:24.030 --> 00:27.160 So if you see here I have called a function print. 00:27.240 --> 00:33.690 Now what exactly a function is a function is basically a code that is already written and can be used 00:33.690 --> 00:35.880 several times whenever you call me. 00:36.060 --> 00:42.690 So Python has some built in function that is they have already written some code and are only available. 00:42.690 --> 00:44.930 All we need to do is call them. 00:44.970 --> 00:49.710 You can also write your own function that we are able to do and functions section. 00:49.790 --> 00:53.760 Now you just need to understand that print is a building function. 00:53.910 --> 01:00.900 And whenever we call a function that means whenever we try to execute the function here if I print that 01:00.900 --> 01:03.940 means I'm calling a function that this print function. 01:04.050 --> 01:11.100 I need to pass on to domain so the input that I give to this particular function here if I'm giving 01:11.100 --> 01:16.540 an import that is hello world input this is the argument for this particular function. 01:16.740 --> 01:20.570 So that means print is a function Hilbert his argument. 01:20.760 --> 01:27.090 No argument can be string or in danger of object whatever we want to display on screen. 01:27.330 --> 01:33.190 So there are different arguments that you can pass to a function depending totally on the function. 01:33.210 --> 01:35.040 So each function is different. 01:35.100 --> 01:36.390 They have their own code. 01:36.420 --> 01:38.300 They have their own use every day. 01:38.490 --> 01:44.850 Now whenever we call the print function and get the argument that is held by an interpreter did this 01:44.850 --> 01:52.120 particular human processor and can't do this or if I just press enter you can see I've got there is 01:52.120 --> 01:57.710 there but you might be thinking that it is showing exactly the same whatever we are entering. 01:57.810 --> 01:59.670 What is the process that is doing. 01:59.680 --> 02:08.100 So if I was maybe even a simple variable just to show you guys 50 you're going to have just displayed 02:08.160 --> 02:09.510 that exact same result. 02:09.660 --> 02:15.770 But what if I pass on multiplication maybe a boss 15 to 60. 02:15.990 --> 02:23.010 You can see it through system give an output or I can try to de Gaulle three variables maybe sequence 02:23.010 --> 02:32.320 to 5 y equals to 60 and then I'm going to get some ptosis to print statement that is my brain function. 02:32.730 --> 02:38.850 So if I do that you can see that I'm human and just prusik and give us the razor. 02:39.000 --> 02:44.360 Now the second thing I want to understand is whatever we want to print several things maybe a string 02:44.550 --> 02:46.570 maybe or India in a single line. 02:46.770 --> 02:52.050 So here what we are doing is you are printing hello world then be operating in danger then we are trying 02:52.050 --> 02:53.430 to provide some variable. 02:53.540 --> 02:56.650 But what if I need to do something in a single line. 02:56.670 --> 02:59.470 Maybe I want to make reply and give a statement. 02:59.690 --> 03:03.010 So for example let me dig this print statement. 03:03.230 --> 03:09.160 You want to print on a string that is multiplication of 5 to 6. 03:09.180 --> 03:13.130 I want to ensure that all 5 might look like six. 03:13.220 --> 03:17.450 So you good doc what we can use is concatenation. 03:17.580 --> 03:24.000 So if I do that and if I add a coma after my string statement to get the second element that is the 03:24.000 --> 03:29.020 second argument and if I Crucis here that is X into y. 03:29.250 --> 03:31.780 That is my 5 and do 60 actually. 03:31.870 --> 03:39.300 So what people can do is say complete the string that is my my depiction of Fife and 60 and then also 03:39.300 --> 03:41.500 it'll bring X into I. 03:41.580 --> 03:44.530 If I think you can see green. 03:44.580 --> 03:52.380 My day begins in 0 5 and 60 is then there is a space that is by before and then the result of X and 03:52.380 --> 03:53.030 Y. 03:53.340 --> 03:57.830 And also we can use symbol to come gotin it seemed here today. 03:57.870 --> 04:00.570 So I just want to frame this one string. 04:00.750 --> 04:04.430 And this is some variables that include India. 04:04.620 --> 04:06.720 So they are totally different today. 04:06.990 --> 04:11.810 So if I want to bring some data by what I can do is I can use a class symbol. 04:11.820 --> 04:12.980 Let me show you. 04:14.810 --> 04:22.350 And then add a class symbol and then you can add second string that is wide and you can see I matters 04:22.580 --> 04:26.330 are now in this and not having a space. 04:26.360 --> 04:34.210 So what I can do is I can add a space after all that is in Hannu I can out of space before or I can 04:34.300 --> 04:38.240 an argument between both of them with spaces. 04:38.450 --> 04:40.900 So let us try that also. 04:44.770 --> 04:46.970 You can see our result of hello where. 04:47.230 --> 04:51.650 So you can play with this because concatenation is really important. 04:51.880 --> 04:58.850 But if I go back to my previous print statement that is multiplication or 5 and 60 is X into y. 04:59.080 --> 05:02.700 So I'm already mentioning 5 and 60 whatever. 05:02.770 --> 05:08.180 I just want to carry that X here and my head and then x and y. 05:08.260 --> 05:14.130 So that would be totally variable dependent and I can use that code as many times as I want. 05:14.230 --> 05:17.440 I just need to change the value of x and y. 05:17.590 --> 05:21.320 So for that we need to use for my being selected for that. 05:21.460 --> 05:23.970 So all you want to do is just write your string. 05:24.280 --> 05:30.840 Now whenever you want to add a particular value all you have to do is this medium with index. 05:30.970 --> 05:32.630 So I want to add five. 05:32.680 --> 05:34.290 That is the value of x. 05:34.300 --> 05:39.720 So we're breaking news I need to add curly braces and give the index of zero. 05:39.970 --> 05:49.150 And here I need to add the second value that is why one data stock index Radio 1 and is now I need to 05:49.150 --> 05:56.010 give the result and so it will be to zero next to an Index index. 05:56.010 --> 06:03.270 Now after a string I need to auricular that this format and here not there but I need to give the values 06:03.360 --> 06:08.050 of 0 1 and 2 2 0 will be my X. 06:08.340 --> 06:14.670 Now one will be my y and this will be my X and Y. 06:14.870 --> 06:17.190 What does that mean you just understand. 06:17.550 --> 06:25.050 If I do that here what happened is I have taken a string and wherever I want to add a number that is 06:25.140 --> 06:29.050 I of media are of value that is not in my control. 06:29.190 --> 06:31.300 I've given them I explain to you. 06:31.470 --> 06:33.270 So this five instead of five. 06:33.270 --> 06:35.700 I have given that index value of zero. 06:35.730 --> 06:39.760 Now for my next value I have fast x. 06:39.870 --> 06:42.460 So this zero will be replaced by X.. 06:42.480 --> 06:45.720 Now the second value that goes here is 60. 06:45.750 --> 06:48.240 So I have used a next value of one. 06:48.270 --> 06:50.990 Now 60 will be replaced by Y. 06:51.000 --> 06:53.270 The third thing is my next thing you off to. 06:53.450 --> 06:56.850 That will be replaced by dislodging off x and y. 06:56.880 --> 07:00.400 Now this doesn't happen so you have to get all these values. 07:00.420 --> 07:04.890 So if I tried to mess with these numberings I can actually change are. 07:04.980 --> 07:05.930 Let me show you. 07:06.150 --> 07:10.110 So instead of zero if I had one hand I should have one. 07:10.110 --> 07:12.980 If I had I'd zero here and if I knew the result. 07:13.050 --> 07:15.380 You can see the positions change. 07:15.510 --> 07:17.230 So hers was X.. 07:17.280 --> 07:20.720 So at the position on 0 5 is splendid. 07:20.940 --> 07:27.260 And next the last one was 60 said the position of is printed. 07:27.420 --> 07:30.450 So you can do a lot of fun with this. 07:30.450 --> 07:33.590 Now there is one more Muntari which is also really important. 07:33.780 --> 07:37.640 And if you are some student of the job you will already know that. 07:37.750 --> 07:38.940 So that perform that. 07:38.950 --> 07:43.250 And when we're trying to execute seems treatment so you'll be comfortable. 07:43.440 --> 07:51.210 So what if instead of using this next system we can try to use our model statement on this matter. 07:51.210 --> 07:57.420 So if I need to print hello with my name I can do that with printing hello and then concatenating that 07:57.420 --> 07:58.700 would go wherever. 07:58.720 --> 08:02.960 That is my last name since he's bored out of string type. 08:03.000 --> 08:04.250 So I will get the result. 08:04.460 --> 08:07.450 But what if there are several times so maybe. 08:07.550 --> 08:09.250 Hello my name is Shubham. 08:09.270 --> 08:11.290 And then there will be some more text. 08:11.430 --> 08:20.090 So what I can do is maybe I can try out then I can try my variable name that is name then I can dial 08:20.220 --> 08:24.380 for the text and I want to are my work and say I have hello. 08:24.540 --> 08:26.120 Welcome to discourse. 08:26.190 --> 08:28.370 This is getting really complicated. 08:28.500 --> 08:34.200 If you want to access several doors it would be quite confusing with the radios and spaces. 08:34.200 --> 08:39.420 So for that you can use the familiar method of C and Java which is using more US. 08:39.510 --> 08:48.990 If I dig example here and use hello and model this is so this more to use and this means this is a string 08:49.370 --> 08:51.010 with this particular model. 08:51.180 --> 08:57.240 And if I want to format and define string is this all I have to do is I don't want to let symbol and 08:57.240 --> 08:58.910 then write the variable name. 08:58.950 --> 09:02.270 So if I do that and you can see I got inertial. 09:02.520 --> 09:04.380 Now there can be many strings. 09:04.470 --> 09:10.890 So if I just try to do neutral Bumble Campbell discourse that would be quite easy on us. 09:11.040 --> 09:14.280 Hello Dan. my modalist is that is my strength. 09:14.490 --> 09:21.450 And after completing the string what I define is my variable which I'm in grouping with this particular 09:21.570 --> 09:22.470 statement. 09:22.650 --> 09:26.320 And you can see authorizer Now there can be many more results. 09:26.340 --> 09:31.040 Many more variables that might need to be included in this print statement. 09:31.380 --> 09:37.590 Let me give you one more example because it makes a lot of pain. 09:37.680 --> 09:46.770 So if a big number I get a new one two three and then some points and if I try to clean floor at any 09:46.770 --> 09:49.740 point of time I have to do some formatting. 09:49.770 --> 09:54.750 I never play with print and say the value is. 09:54.910 --> 09:56.330 Now I'm using flawed. 09:56.340 --> 10:02.520 I need to use more units that are different that I like to use is more do this. 10:02.520 --> 10:05.730 And then the video with one that is not finder. 10:05.850 --> 10:12.570 You can see I've got the video but what if I need to get only two decimal points and I just want to 10:12.570 --> 10:13.910 ignore all the other. 10:14.130 --> 10:21.150 So one thing I can do is if I convert it into India I will just get one to three but if I use formatting 10:21.150 --> 10:22.790 method I can do that. 10:22.890 --> 10:25.070 So I had to do this. 10:25.380 --> 10:28.440 Now with this more less I need to add one. 10:28.620 --> 10:35.280 And then after that is done all the same if I do that I just get two decimal points. 10:35.400 --> 10:35.840 OK. 10:35.880 --> 10:38.030 I want to bring you the news at a time. 10:38.220 --> 10:39.820 I can try that also. 10:39.930 --> 10:44.810 I have nothing that is one to play and I can also pick one more variable. 10:44.940 --> 10:53.710 You read off one 50 and then try to bring these both values and my friend stateman so you need to print 10:53.710 --> 10:54.720 my floor. 10:54.830 --> 10:58.080 So all I can do is more or less than one way. 10:58.210 --> 11:02.050 And then they deliver news or have to use is more unicity. 11:02.330 --> 11:08.920 One says stringless complete model does not have to create or topple indiscernible I need to pass my 11:08.920 --> 11:10.000 first value. 11:10.000 --> 11:10.960 That is my floor. 11:10.990 --> 11:16.130 That is my name and the second value that is my name. 11:16.240 --> 11:17.950 You can see that. 11:18.160 --> 11:23.170 So print this really big print is really interesting and you can play a lot of thing. 11:23.260 --> 11:28.930 When we tried to do some project we tried to do some exercise when we were losing these things and you 11:28.930 --> 11:30.600 have to do a lot of cost. 11:30.910 --> 11:32.320 So this is really interesting. 11:32.320 --> 11:34.270 Don't forget to apply this on go system.