Here even in the last video we are done with the check button and radio button.
So in this video we are going to learn entry text and labels so these are two things you are already
familiar with like hey fever or item then this teen showing take it or b y project take it to be buy
and all these things.
These are labels and this area of it.
I am writing this in taxes is next.
So this is a visit only.
And if we talk about the entry then when I click the Search button I get this option to write here some.
And this is that thing.
So this is an entry.
So these are the two things that we are going to do here.
Also until now we do not have learned that how we can use two methods.
So in this video we will use the methods to build a small application that is this one that is not showing
that in show that one
and this one when you write something in first column sort of first entry then in second and then click
calculate you will get this sum of debt.
So this is what we will use these three things.
And it matters with that one to create this simple calculator creating the some of these files.
So let us begin with Dedmon.
First of all you will learn that how we can create these three things.
So creating these things are very easy just like the other widgets.
If I have added for label just tried adding capital and label in that go out the window and the tax
do you want.
There is a user name for now and then just added back
save this one.
And if you run this one now you will get this label.
So this is actually a label not a button because you can click this one and it will just show you that
what dating here is without any other widget label is used less because you require something to show
that this thing is that.
Now if we talk about the entry that is also again very simple just entry window in which you on that
one and just this thing you don't back say this one and one this one now
what's happening that we know it media in the terminal see the next stop and then byte and 3 decay B1
they will go the distance.
So here I have the label here have my entry.
You can also make this one in this side because they are both clean same line so you can use side option
in the back.
This is also one you can use with this say I own my label in left.
And these are in capital letters and this one entry in right so just left right and if you run that
mono you will get this one.
Level in the left and then to Indy.
Right now we talk about the text
then just like these here we create text my d capital and just provide a window in which you want that
one and then pack that one to go with that one.
Here we have no text so text is just type of frame in which you can write some text and then we know
remove these sites because they will create confusion and advice and you're going directly at text from
here in this text by just using a method.
Now I will tell you that how you're going to use the method.
So just this back is also a type of method we can say for inserting text we use insert matter just do
not insert tenses and in that one first pass insert and then devalue Ni you need to insert in that and
say helpful.
Now run that one you will get help.
You can also remove this one and add your own text there.
So these are the three basic things you need to know about and now let we use these three things to
create that simple calculator.
So first of all we will begin with creating labels.
If I have noticed there we have two levels two and three and a button and and he did label that is showing
the output.
We do not have that one in the first view but in last.
So let me begin with the levels first one say level Eleven.
This is going to be level provided a window in which you want that one and XT save first.
No.
And then element to create this time we will use grid metal because that is just for simple and basic
learning now greedy and say this one in first draw and first column so row one column is equal to zero
because these being from zero we are taking this second do actually.
After that one same with Labor to just copy this one base this one here and just create disowning the
second like second number.
This one and draw two columns same and these up two.
DAVID WEBER delivers if you save this one and run this one here you will get two levels denoting first
number and second number.
This time they're not changing their position by line increasing and decreasing the size because they
are not defined by grid metal.
Not department.
So this is about this one.
Now the heating label must be just cleared all the levels just a label.
Anything we do not need anything to show there.
Because they're so he delivered and can go infinity after the output.
Now here provide this one a position that is labeled grade Jihad D and in that one provide ROIs equal
to say 7 6 and call them equal to say that time I had that made that one in the corner.
So this time just forth so that it will not mean any last owes it to so here we have row six and column
two.
Now if you save this one and move to increase.
So here we have forced entry even that will be simply and treat in that one provide the window in which
you want to have that particular entry after that.
Again this one is going to be something that will provide us an input.
So it requires a variable to store that input.
And in the case of Chad button radio button we have only the integer values.
But as I have told you in the data science section that the input is always a string.
So he'll be required to variables that are string variable that will take the value of these.
Then they will convert that value into integer and provide us this sum.
So the first step is basically taking the variable and for entry we use the variable extra editable
is the parameter listed in options you can check the and provide this one say excellent.
Any value we want to now go with this one.
And this this one here even though great we want this one with the label one so raw will be one and
column will be two
and E to withdraw label 2 so row two and column two.
And this also x2 is only two.
Now we will define x1 and x2 x1 is going to be a string where label x2 is also going to be this one
so copy the sun and pasted here.
Now we are done with the labels and the entries.
Now if you've tried to run this one you will get something like this.
First no no no.
Second no.
Now we need something that will do something when we enter this.
Now at this point we're not able to do something with this thing.
This is useless right now.
So we need a button here on clicking which we get this.
So let's first create a button so here we have a button saved and then button it we have a button window
and the text will be something like say calculate
after that won't provide the command and command will be and in function say we will define a function
letters with names some after that that we discern just great.
This one but on the grid and going to window three column zero
labial now done with this button also.
Let's check so that we cannot have any at a buffet.
We are getting error here because some is not defined so don't focus on that one.
Now we will define this sum.
So here we have defined some and then princes.
So the barometers we require for this one are X1 and the x2.
These are of our variables which are actually the numbers that we are taking with the entry.
Now is these really quite another variable that is label here.
This this one that will show what output.
One more thing.
Make sure you are writing label before these two.
I'll show you that.
Also why.
But before that.
Let me define a function.
So first of all say here we have N1 and.
And now we have actually the entries informal variables.
These are just defining the entries value the just all in x1.
Now we need to fetch the data from x1.
That was actually the data in that.
It may be anything.
So do we get that data.
If you check the options available with the entry we have a method known as get that will actually get
the value from the entries and we will use that one simply just X1 don't get and just differences.
Simple as that.
So this is a method used to get the values from entries and get this abating.
Basic method you will learn about this one a lot while you learn to gold and develop your own programs.
And same for x2.
Now just this sum.
But if you simply do N1 one plus and 2 it will be wrong because these are actually string at this point.
So convert these into integer values we go with that one and just this one int day we have this one
last step to configured the level to show the output.
So for that one we have a method known as config denoting configuration after that one here provide
the text that will be shown on that one say some is the dots and then use this variable here.
So percent is dy and after the quotes here we have a percentage some after that and just provide I've
written here and nothing else.
Now if you'll notice on of a program that it is actually complicated but if you try to run this one
you will get add are there.
There we go right now 2 3 and on click and calculate we are getting added some missing 2 required positional
arguments and something like that.
The reason for that run is here Vidic wire another thing imported into python.
Without that fun we cannot create this somebody using its widgets.
So that's known as partial and you can import that one by just using from f you and see tools and then
post nouns this one func those if you I the end.
If you NC does import bar she is
they've had this one after that one at a line here.
Showing the deposits Jill that what the values you are using in the calculation.
So just some will do bar she'll come in that will provide I'm using some.
That is my function with which I am working with.
Also I'm using label in the output and I'm using the values x1 and x2.
Save this one.
And if you run this one now over that 1 3 4 calculate some is 7.
And on this one is also not perfect position.
If you provide any value here calculate if 7 9 6.
It will calculate any value you will provide here.
There is no limit for that one.
We had this.
So this is how you're going to create your own calculators.
Also now you have all the skills to calculate any kind of calculator.
So try giving yourself a small task creating a complete calculator and I hope you will get that one.
This is a task for you.
So thanks for watching and I hope this one is clear.
That's how you're going to use the methods now because I have not including any matter in the previous
videos so I tried to include them here with this little example.
So thanks for watching.
Soon the next video.