1 00:00:05,410 --> 00:00:09,230 Here even in the last video we are done with the check button and radio button. 2 00:00:09,740 --> 00:00:16,670 So in this video we are going to learn entry text and labels so these are two things you are already 3 00:00:16,670 --> 00:00:24,320 familiar with like hey fever or item then this teen showing take it or b y project take it to be buy 4 00:00:24,470 --> 00:00:25,940 and all these things. 5 00:00:26,090 --> 00:00:29,420 These are labels and this area of it. 6 00:00:29,450 --> 00:00:34,240 I am writing this in taxes is next. 7 00:00:34,260 --> 00:00:36,120 So this is a visit only. 8 00:00:36,270 --> 00:00:42,410 And if we talk about the entry then when I click the Search button I get this option to write here some. 9 00:00:42,480 --> 00:00:44,330 And this is that thing. 10 00:00:44,340 --> 00:00:46,780 So this is an entry. 11 00:00:46,860 --> 00:00:49,510 So these are the two things that we are going to do here. 12 00:00:49,540 --> 00:00:54,950 Also until now we do not have learned that how we can use two methods. 13 00:00:54,950 --> 00:01:02,220 So in this video we will use the methods to build a small application that is this one that is not showing 14 00:01:02,880 --> 00:01:06,040 that in show that one 15 00:01:10,510 --> 00:01:19,030 and this one when you write something in first column sort of first entry then in second and then click 16 00:01:19,030 --> 00:01:21,840 calculate you will get this sum of debt. 17 00:01:22,570 --> 00:01:24,680 So this is what we will use these three things. 18 00:01:24,700 --> 00:01:31,780 And it matters with that one to create this simple calculator creating the some of these files. 19 00:01:31,780 --> 00:01:33,630 So let us begin with Dedmon. 20 00:01:33,820 --> 00:01:38,560 First of all you will learn that how we can create these three things. 21 00:01:38,590 --> 00:01:42,960 So creating these things are very easy just like the other widgets. 22 00:01:42,970 --> 00:01:51,600 If I have added for label just tried adding capital and label in that go out the window and the tax 23 00:01:51,610 --> 00:01:52,180 do you want. 24 00:01:52,180 --> 00:01:59,650 There is a user name for now and then just added back 25 00:02:02,310 --> 00:02:03,280 save this one. 26 00:02:03,480 --> 00:02:06,880 And if you run this one now you will get this label. 27 00:02:06,960 --> 00:02:12,510 So this is actually a label not a button because you can click this one and it will just show you that 28 00:02:12,520 --> 00:02:19,320 what dating here is without any other widget label is used less because you require something to show 29 00:02:19,650 --> 00:02:21,870 that this thing is that. 30 00:02:21,940 --> 00:02:29,410 Now if we talk about the entry that is also again very simple just entry window in which you on that 31 00:02:29,410 --> 00:02:36,220 one and just this thing you don't back say this one and one this one now 32 00:02:42,920 --> 00:02:55,400 what's happening that we know it media in the terminal see the next stop and then byte and 3 decay B1 33 00:02:56,350 --> 00:02:57,460 they will go the distance. 34 00:02:58,140 --> 00:03:02,540 So here I have the label here have my entry. 35 00:03:02,580 --> 00:03:11,610 You can also make this one in this side because they are both clean same line so you can use side option 36 00:03:11,610 --> 00:03:13,340 in the back. 37 00:03:13,350 --> 00:03:18,860 This is also one you can use with this say I own my label in left. 38 00:03:19,530 --> 00:03:30,230 And these are in capital letters and this one entry in right so just left right and if you run that 39 00:03:30,240 --> 00:03:32,670 mono you will get this one. 40 00:03:34,070 --> 00:03:37,530 Level in the left and then to Indy. 41 00:03:37,630 --> 00:03:39,890 Right now we talk about the text 42 00:03:42,620 --> 00:03:51,440 then just like these here we create text my d capital and just provide a window in which you want that 43 00:03:51,440 --> 00:03:56,820 one and then pack that one to go with that one. 44 00:03:56,860 --> 00:04:05,730 Here we have no text so text is just type of frame in which you can write some text and then we know 45 00:04:05,760 --> 00:04:13,150 remove these sites because they will create confusion and advice and you're going directly at text from 46 00:04:13,150 --> 00:04:16,630 here in this text by just using a method. 47 00:04:16,660 --> 00:04:19,090 Now I will tell you that how you're going to use the method. 48 00:04:19,090 --> 00:04:26,440 So just this back is also a type of method we can say for inserting text we use insert matter just do 49 00:04:26,460 --> 00:04:33,230 not insert tenses and in that one first pass insert and then devalue Ni you need to insert in that and 50 00:04:33,240 --> 00:04:33,930 say helpful. 51 00:04:33,940 --> 00:04:38,340 Now run that one you will get help. 52 00:04:38,710 --> 00:04:41,800 You can also remove this one and add your own text there. 53 00:04:43,180 --> 00:04:50,140 So these are the three basic things you need to know about and now let we use these three things to 54 00:04:50,140 --> 00:04:51,730 create that simple calculator. 55 00:04:52,690 --> 00:04:56,020 So first of all we will begin with creating labels. 56 00:04:56,050 --> 00:05:03,430 If I have noticed there we have two levels two and three and a button and and he did label that is showing 57 00:05:03,430 --> 00:05:04,690 the output. 58 00:05:04,690 --> 00:05:09,660 We do not have that one in the first view but in last. 59 00:05:09,670 --> 00:05:15,390 So let me begin with the levels first one say level Eleven. 60 00:05:15,760 --> 00:05:23,050 This is going to be level provided a window in which you want that one and XT save first. 61 00:05:23,070 --> 00:05:26,860 No. 62 00:05:27,220 --> 00:05:33,850 And then element to create this time we will use grid metal because that is just for simple and basic 63 00:05:33,850 --> 00:05:45,020 learning now greedy and say this one in first draw and first column so row one column is equal to zero 64 00:05:46,230 --> 00:05:50,660 because these being from zero we are taking this second do actually. 65 00:05:50,700 --> 00:05:59,150 After that one same with Labor to just copy this one base this one here and just create disowning the 66 00:05:59,160 --> 00:06:05,490 second like second number. 67 00:06:05,630 --> 00:06:11,590 This one and draw two columns same and these up two. 68 00:06:12,180 --> 00:06:20,180 DAVID WEBER delivers if you save this one and run this one here you will get two levels denoting first 69 00:06:20,180 --> 00:06:21,230 number and second number. 70 00:06:21,230 --> 00:06:26,540 This time they're not changing their position by line increasing and decreasing the size because they 71 00:06:26,540 --> 00:06:28,080 are not defined by grid metal. 72 00:06:28,610 --> 00:06:30,980 Not department. 73 00:06:31,010 --> 00:06:32,280 So this is about this one. 74 00:06:32,340 --> 00:06:38,640 Now the heating label must be just cleared all the levels just a label. 75 00:06:38,650 --> 00:06:42,150 Anything we do not need anything to show there. 76 00:06:42,290 --> 00:06:47,090 Because they're so he delivered and can go infinity after the output. 77 00:06:47,120 --> 00:06:57,350 Now here provide this one a position that is labeled grade Jihad D and in that one provide ROIs equal 78 00:06:57,350 --> 00:07:06,370 to say 7 6 and call them equal to say that time I had that made that one in the corner. 79 00:07:06,410 --> 00:07:16,670 So this time just forth so that it will not mean any last owes it to so here we have row six and column 80 00:07:16,670 --> 00:07:17,440 two. 81 00:07:17,450 --> 00:07:21,540 Now if you save this one and move to increase. 82 00:07:21,590 --> 00:07:32,040 So here we have forced entry even that will be simply and treat in that one provide the window in which 83 00:07:32,040 --> 00:07:35,720 you want to have that particular entry after that. 84 00:07:36,270 --> 00:07:39,650 Again this one is going to be something that will provide us an input. 85 00:07:39,870 --> 00:07:42,390 So it requires a variable to store that input. 86 00:07:42,660 --> 00:07:46,720 And in the case of Chad button radio button we have only the integer values. 87 00:07:46,860 --> 00:07:52,170 But as I have told you in the data science section that the input is always a string. 88 00:07:52,170 --> 00:07:57,340 So he'll be required to variables that are string variable that will take the value of these. 89 00:07:57,490 --> 00:08:02,010 Then they will convert that value into integer and provide us this sum. 90 00:08:02,010 --> 00:08:08,400 So the first step is basically taking the variable and for entry we use the variable extra editable 91 00:08:09,300 --> 00:08:14,880 is the parameter listed in options you can check the and provide this one say excellent. 92 00:08:15,770 --> 00:08:20,890 Any value we want to now go with this one. 93 00:08:21,000 --> 00:08:32,680 And this this one here even though great we want this one with the label one so raw will be one and 94 00:08:32,680 --> 00:08:33,640 column will be two 95 00:08:39,630 --> 00:08:44,200 and E to withdraw label 2 so row two and column two. 96 00:08:44,520 --> 00:08:48,780 And this also x2 is only two. 97 00:08:48,870 --> 00:08:59,880 Now we will define x1 and x2 x1 is going to be a string where label x2 is also going to be this one 98 00:09:01,560 --> 00:09:05,090 so copy the sun and pasted here. 99 00:09:05,170 --> 00:09:09,520 Now we are done with the labels and the entries. 100 00:09:09,520 --> 00:09:13,020 Now if you've tried to run this one you will get something like this. 101 00:09:13,660 --> 00:09:15,830 First no no no. 102 00:09:15,910 --> 00:09:16,730 Second no. 103 00:09:17,440 --> 00:09:20,520 Now we need something that will do something when we enter this. 104 00:09:20,530 --> 00:09:24,440 Now at this point we're not able to do something with this thing. 105 00:09:24,460 --> 00:09:26,770 This is useless right now. 106 00:09:26,770 --> 00:09:30,070 So we need a button here on clicking which we get this. 107 00:09:30,820 --> 00:09:42,190 So let's first create a button so here we have a button saved and then button it we have a button window 108 00:09:42,730 --> 00:09:45,850 and the text will be something like say calculate 109 00:09:49,280 --> 00:09:57,120 after that won't provide the command and command will be and in function say we will define a function 110 00:09:57,120 --> 00:10:03,380 letters with names some after that that we discern just great. 111 00:10:03,390 --> 00:10:12,350 This one but on the grid and going to window three column zero 112 00:10:17,680 --> 00:10:21,470 labial now done with this button also. 113 00:10:21,590 --> 00:10:25,920 Let's check so that we cannot have any at a buffet. 114 00:10:26,150 --> 00:10:33,000 We are getting error here because some is not defined so don't focus on that one. 115 00:10:33,090 --> 00:10:35,790 Now we will define this sum. 116 00:10:35,930 --> 00:10:40,720 So here we have defined some and then princes. 117 00:10:40,740 --> 00:10:46,630 So the barometers we require for this one are X1 and the x2. 118 00:10:46,640 --> 00:10:54,130 These are of our variables which are actually the numbers that we are taking with the entry. 119 00:10:54,130 --> 00:11:00,610 Now is these really quite another variable that is label here. 120 00:11:00,610 --> 00:11:04,230 This this one that will show what output. 121 00:11:04,290 --> 00:11:04,900 One more thing. 122 00:11:04,950 --> 00:11:09,180 Make sure you are writing label before these two. 123 00:11:09,300 --> 00:11:10,170 I'll show you that. 124 00:11:10,210 --> 00:11:11,580 Also why. 125 00:11:11,790 --> 00:11:12,580 But before that. 126 00:11:12,630 --> 00:11:14,580 Let me define a function. 127 00:11:14,580 --> 00:11:18,430 So first of all say here we have N1 and. 128 00:11:18,620 --> 00:11:25,400 And now we have actually the entries informal variables. 129 00:11:25,490 --> 00:11:29,480 These are just defining the entries value the just all in x1. 130 00:11:29,480 --> 00:11:32,700 Now we need to fetch the data from x1. 131 00:11:32,750 --> 00:11:34,480 That was actually the data in that. 132 00:11:34,580 --> 00:11:35,930 It may be anything. 133 00:11:36,080 --> 00:11:38,240 So do we get that data. 134 00:11:38,240 --> 00:11:43,550 If you check the options available with the entry we have a method known as get that will actually get 135 00:11:43,550 --> 00:11:52,790 the value from the entries and we will use that one simply just X1 don't get and just differences. 136 00:11:52,790 --> 00:11:54,930 Simple as that. 137 00:11:54,940 --> 00:11:58,860 So this is a method used to get the values from entries and get this abating. 138 00:11:58,870 --> 00:12:05,970 Basic method you will learn about this one a lot while you learn to gold and develop your own programs. 139 00:12:05,980 --> 00:12:08,500 And same for x2. 140 00:12:08,500 --> 00:12:10,710 Now just this sum. 141 00:12:10,900 --> 00:12:17,500 But if you simply do N1 one plus and 2 it will be wrong because these are actually string at this point. 142 00:12:18,340 --> 00:12:26,930 So convert these into integer values we go with that one and just this one int day we have this one 143 00:12:27,640 --> 00:12:33,310 last step to configured the level to show the output. 144 00:12:33,580 --> 00:12:40,690 So for that one we have a method known as config denoting configuration after that one here provide 145 00:12:40,690 --> 00:12:50,950 the text that will be shown on that one say some is the dots and then use this variable here. 146 00:12:51,220 --> 00:13:00,580 So percent is dy and after the quotes here we have a percentage some after that and just provide I've 147 00:13:00,580 --> 00:13:03,130 written here and nothing else. 148 00:13:03,140 --> 00:13:10,450 Now if you'll notice on of a program that it is actually complicated but if you try to run this one 149 00:13:11,350 --> 00:13:14,450 you will get add are there. 150 00:13:14,470 --> 00:13:23,800 There we go right now 2 3 and on click and calculate we are getting added some missing 2 required positional 151 00:13:23,800 --> 00:13:25,970 arguments and something like that. 152 00:13:26,950 --> 00:13:34,810 The reason for that run is here Vidic wire another thing imported into python. 153 00:13:34,930 --> 00:13:38,230 Without that fun we cannot create this somebody using its widgets. 154 00:13:38,770 --> 00:13:49,100 So that's known as partial and you can import that one by just using from f you and see tools and then 155 00:13:49,120 --> 00:13:53,160 post nouns this one func those if you I the end. 156 00:13:54,190 --> 00:14:00,650 If you NC does import bar she is 157 00:14:03,440 --> 00:14:07,320 they've had this one after that one at a line here. 158 00:14:08,600 --> 00:14:13,880 Showing the deposits Jill that what the values you are using in the calculation. 159 00:14:13,880 --> 00:14:22,490 So just some will do bar she'll come in that will provide I'm using some. 160 00:14:22,490 --> 00:14:25,940 That is my function with which I am working with. 161 00:14:26,090 --> 00:14:32,170 Also I'm using label in the output and I'm using the values x1 and x2. 162 00:14:32,490 --> 00:14:33,590 Save this one. 163 00:14:33,870 --> 00:14:41,200 And if you run this one now over that 1 3 4 calculate some is 7. 164 00:14:42,470 --> 00:14:45,160 And on this one is also not perfect position. 165 00:14:45,710 --> 00:14:50,800 If you provide any value here calculate if 7 9 6. 166 00:14:50,810 --> 00:14:53,330 It will calculate any value you will provide here. 167 00:14:53,360 --> 00:14:55,330 There is no limit for that one. 168 00:14:56,050 --> 00:14:56,810 We had this. 169 00:14:57,140 --> 00:15:00,410 So this is how you're going to create your own calculators. 170 00:15:00,410 --> 00:15:05,840 Also now you have all the skills to calculate any kind of calculator. 171 00:15:05,840 --> 00:15:13,990 So try giving yourself a small task creating a complete calculator and I hope you will get that one. 172 00:15:14,060 --> 00:15:16,010 This is a task for you. 173 00:15:16,010 --> 00:15:18,970 So thanks for watching and I hope this one is clear. 174 00:15:19,220 --> 00:15:23,600 That's how you're going to use the methods now because I have not including any matter in the previous 175 00:15:23,600 --> 00:15:28,140 videos so I tried to include them here with this little example. 176 00:15:28,130 --> 00:15:29,060 So thanks for watching. 177 00:15:29,060 --> 00:15:30,050 Soon the next video.