All right so finally we head into doing some numerical operations.
So what we can do is we can create a new chapter in a book.
Let's call it chess Nimer coal operations.
And by right.
So let's start.
OK so first of all you know we have of course done a lot of operators in Python.
And so we have seen quite a lot of things work we can do using operators but now can we apply them to
by areas as a whole.
Lexi First of all let's use a simple let's use a simple number that's a scalar or a simple number so
let's say I'm going to use a scalar.
So I'm going to define this let me call this a markdown.
Just also using scalars you are with numb by x.
OK.
So let's begin.
So let's start with adding Skelos to are supposed to fall we need to post some PI as MP.
Step 1 right.
Create a atom.
So let's say Creedon that by saying A is equal to any DOT Terry Cross list let's say
oops sorry sorry that's OK you understand finally the matter right.
So finally what I want to do is I want to say an equal to a plus.
I'm going to use a scalar or two that's a scalar number.
Let's see what happens.
Print a.
Can I do this by the way.
What happens.
So.
All right so because a new ship will connect to my server.
OK.
See what happened 15 to 17 right.
Oops.
Four plus 2 6 2 1 2 3 2 1 2 4.
So if the steal or get added to each and every element in the NBA.
So this is something which which you know Nonpoint us and you can use all the operators that you want.
So with this let's say for example if multiplied by a multiplied by 2 a.
So that would be 70 must we're about to study for six months boy choose 12.
That was 2 was 1 0 6 right for the most would be to his mind 0 6 and so on.
What if I do eight divided by two would be done.
Oh yes it is.
It will be a floating point values right.
Can I do floored division.
Yes I can.
Where you will get all the all in the decimal portion of it or really the part of it.
Correct.
OK.
That's about floor division.
All right.
Can I have modalists let's say a model is 2.
So it's going to be the ones and zeros that's it.
Because you know it's either divisible by 2 artists Nando's by two and after that the remainder is going
to be either 1 or 0 0.
That's how it's going to be.
Let's say for the race to operate the works and that is you know it's us us race to our power operator.
So if I say a square.
Ooh that's cool.
So it's great up each of the numbers.
So the first one is 17 in the 17 that is 289.
That's cool.
So you have you have different operators that can that can work with it.
Right so a scalar can be used for multiple for multiple things like this.
Whereas if you had to do the same thing with the list.
Oh my God how how terrible that is going to be.
Let's have a look.
The list is equal to.
So you're going to have list is 15.
Come on 21 come up 14.
Come on right now or something like that.
Right.
So let me say this is your list.
And what would I have to do.
I would have to do something like this.
I need a I need at least one is equal to is equal to for every element in LSD right.
I'm going to do element plus two.
And then I print at least those what I would have done if it was a list correct.
So these are some things which got completely.
Sorry.
I need to print sorry.
Let's do one.
So there I get all my values added later.
So I need to do this by looping through with.
And it takes a long time but not so for a number.
And that's the beauty of an umpire.
So now let's go on.
So this is about using scalars.
Now what if I use something else live and just put his mark down and instead of using scalars.
Now I'm going to say athletic and all operations on two addy's as a whole.
So I'm going to do that.
So I'm going to do operations on two hours completely correct.
Which is going to be
as we can see here.
Import nut pie as MP and let's see is equal to any dot.
And of course I'm going to have 11 or 12 come a 13 right.
Come on come on tourney one come on 22.
Come on 23 right.
Come on get 31 come on 32 come on come on 33.
Right.
These are a few things that you can think of.
I'm just creating a B I don't want to keep creating like this let me just create all ones let me say
NPE dot anti-dog ones and little ones and I just create old ones altogether.
So so ones.
And then I can just say I just need to say all ones I want from my tree so that it's you know you don't
want that.
So if I can print a and print B this is what I get.
Only two non keyword arguments expect where is it.
Where is that.
OK.
Sorry I didn't I didn't create it completely.
I didn't create a picture at a shy
oh my
cool.
Yeah.
So in ones and then you just put it as type as comedy type going into your.
So there I have Levin got tocome in 21 22 23.
And each of them is once.
So this is about how you can get as close to an umpire and write it.
So if this is does exactly how I want things to be in in number.
All right let's.
This is about Ameri I created two of them.
But what we want to do I want to do arithmetic operations let's do basic addition and just check what
happens.
A class 3.
Wow.
Today it's area of plus one 12 was one turning 13 because when it adds each element one after the other
one element corresponding to another element this element corresponding to this one 13 corresponding
to this one called.
Isn't that cool.
So if I do a mine is v.
That is correct.
So.
So if I have a multiplied by the can I do this all yes I can multiply each value by 1 11 1 1 one 1.
That's it.
So a multiple but it multiplies not by multiplying in the matrix multiplication manner but the multiplication
of twice that's how element by an n and multiplication multiplied by B.