WEBVTT

00:00.620 --> 00:03.740
I will call you back again to end up with a lecture in PHP.

00:04.160 --> 00:09.260
In this video lecture we go ahead and look at the maths operators.

00:15.500 --> 00:18.080
So we are going to deal with maths.

00:18.080 --> 00:22.160
And there are some operators that we need to be able to work with maths.

00:22.190 --> 00:23.840
So let's go ahead and see.

00:23.840 --> 00:26.150
Uh we are right into PHP.

00:26.360 --> 00:36.500
We can actually go ahead and uh, do some things like calculations like say four plus one and uh, go

00:36.500 --> 00:40.010
ahead and put a semicolon and then let's go ahead and refresh this.

00:40.040 --> 00:42.620
You can see I have five right in here.

00:42.890 --> 00:50.270
And it can actually say maybe four times five five.

00:50.420 --> 00:51.020
That is four.

00:51.020 --> 00:52.430
Multiply five.

00:52.430 --> 00:54.830
And let's go ahead and say 20.

00:54.890 --> 00:58.070
And what if we go ahead and divide that.

00:58.130 --> 01:01.890
Go ahead and have a Eight.

01:01.920 --> 01:14.460
Now we can know how to do some complex things like let me see, four plus five, multiply by by two,

01:14.610 --> 01:17.310
and let's go ahead and run this code and check it out.

01:17.310 --> 01:23.610
So what actually happens is that the multiplication was done first and then it adds.

01:23.610 --> 01:31.410
So if you want to do this you can actually say put this one inside the brackets and it's going to be

01:31.440 --> 01:34.800
four plus five multiplied by two.

01:34.830 --> 01:36.090
Let's go ahead and refresh this.

01:36.090 --> 01:38.670
And you can see I have 18 right in here.

01:38.670 --> 01:42.780
So there are so many so many things I'm going to do is in the math operators.

01:42.780 --> 01:52.470
So let me go ahead and say I'm going to add this inside a a variable and let the variable name be my

01:52.500 --> 01:53.490
num.

01:53.640 --> 01:54.240
All right.

01:54.240 --> 02:03.920
So if I say my name is equal to let me say 15, then if I go ahead and equal my known.

02:04.340 --> 02:08.720
Let me see my gnome then.

02:08.750 --> 02:11.660
If you got a refresh, you can have 15 right in here.

02:11.690 --> 02:14.270
So I can be able to do so many things.

02:14.270 --> 02:14.810
Ready.

02:14.810 --> 02:28.010
And now even the variable I can actually say maybe say uh, my gnome increment, then what it actually

02:28.010 --> 02:30.620
means is that I want to add 1 to 15.

02:30.620 --> 02:33.740
If I refresh this, you can see I have a 16.

02:33.740 --> 02:40.610
And if I go ahead and say my known minus minus, I refresh, I have 14.

02:40.610 --> 02:43.310
So there are so many things I want to do.

02:43.340 --> 02:54.830
This actually is equal to me saying maybe my gnome minus one or my gnome plus.

02:56.870 --> 02:57.560
Plus one.

02:58.670 --> 03:06.060
So let's go to refresh this and see I have a 15 right in here because I have minus already in.

03:06.060 --> 03:09.360
So if I go ahead and delete this, I'll refresh this.

03:09.600 --> 03:11.070
I have 16.

03:11.490 --> 03:18.000
So if I go ahead and say minimum minus one that is 14.

03:18.600 --> 03:21.060
So there are so many things you can do.

03:21.090 --> 03:25.320
Let me say I want to add some things right in here.

03:25.350 --> 03:29.220
I got say my num.

03:31.530 --> 03:37.530
Um, let me see my known loss ten.

03:38.190 --> 03:42.390
Now this will actually give us a let's go ahead and save this.

03:42.420 --> 03:43.770
Let's go ahead and remove this here.

03:44.850 --> 03:45.720
All right.

03:46.800 --> 03:50.850
So my number is equal to 15.

03:50.850 --> 03:56.190
Then my num plus a ten.

03:56.970 --> 04:05.030
Then all I need to do now is let's go here and say my unknown is going to be equal to my plus ten.

04:05.030 --> 04:06.980
So I want to have 25.

04:07.010 --> 04:08.180
Let's go ahead and run this.

04:08.180 --> 04:09.890
And you can see I have 25.

04:10.250 --> 04:10.790
All right.

04:10.790 --> 04:17.420
So another way of doing this is actually saying that we have.

04:17.450 --> 04:30.020
Instead of saying my norm is equal to my norm plus ten, I can actually see my norm plus equal ten.

04:30.020 --> 04:32.840
And let's refresh this and have 25.

04:32.840 --> 04:42.170
So if I say minus ten minus equal and that is five because 15 minus ten is five.

04:42.170 --> 04:49.580
And if I go ahead and say minus one multiply by ten, that is 150.

04:49.610 --> 04:57.800
So if I say my norm divide equal that is 1.5.

04:58.100 --> 05:00.770
So you can see some of these things.

05:00.770 --> 05:03.710
You can actually be able to do that using PHP.

05:03.750 --> 05:05.850
and it is very, very easy.

05:05.880 --> 05:11.340
Now I'm going to introduce you some to some of the muscle operators that are needed, which it can be

05:11.340 --> 05:14.130
good to use by using simple functions.

05:14.130 --> 05:20.700
And these functions are just a small snippets of code that we can actually call to perform some specific,

05:21.000 --> 05:23.010
uh, functions or operations.

05:23.040 --> 05:24.990
Operations in PHP.

05:25.800 --> 05:29.280
So let's go ahead and introduce you to some of these muscle operators.

05:29.310 --> 05:31.320
Let me say I have a.

05:33.810 --> 05:35.880
I'm go ahead and delete this.

05:36.480 --> 05:36.870
Okay.

05:36.870 --> 05:38.280
Let me go ahead and delete this.

05:38.280 --> 05:44.190
And let me say I have a call and I have what is called an absolute value.

05:44.190 --> 05:49.320
So if I see this is absolute value so abs.

05:49.350 --> 05:52.320
And then I'll go ahead and add negative sign right in here.

05:52.350 --> 05:54.240
Let me say negative one.

05:54.360 --> 05:55.950
Uh ten.

05:55.980 --> 05:59.460
And if I refresh this I have positive ten output.

05:59.460 --> 06:01.260
So that is the absolute value.

06:01.260 --> 06:06.610
And what if I have I'll go ahead and comment on these then.

06:06.640 --> 06:15.100
What if I have let me see a Q and A power of two by three?

06:15.100 --> 06:19.090
So if I want to wish to part 2 to 3, that would give me eight.

06:19.120 --> 06:22.690
If I refresh this, you can see I have eight right in here.

06:22.720 --> 06:25.060
Now we have a square roots.

06:25.330 --> 06:27.790
Um, let's go ahead and comment on this.

06:28.480 --> 06:35.950
We have a square root and I go ahead and equal square root of uh, 8 to 1.

06:36.370 --> 06:40.990
So let's go ahead and uh check it out.

06:40.990 --> 06:42.010
That is nine.

06:42.010 --> 06:45.400
So you can actually put square roots of anything in a skirt.

06:46.060 --> 06:46.720
All right.

06:46.720 --> 06:56.200
So there are some of these mass operators you can be able to use like a max Solomon and say equal max.

06:56.200 --> 07:00.910
And then go ahead and say maybe ten and six.

07:01.210 --> 07:04.360
And uh, it's going to give you the maximum number.

07:04.360 --> 07:05.550
And that is ten.

07:05.580 --> 07:11.460
So if you want to use the minimum number, you can actually see it coming.

07:11.460 --> 07:13.110
And let's go ahead and check it out.

07:13.110 --> 07:14.400
And that is six.

07:14.700 --> 07:18.150
So there are so many math operators out there.

07:18.150 --> 07:20.790
It can be put to use and play around with them.

07:20.790 --> 07:23.430
And you can actually get something so cool.

07:23.460 --> 07:23.940
All right.

07:23.940 --> 07:26.970
So we have so many of them and they are like this.

07:26.970 --> 07:32.940
So the flow uh the cosine, the sine, the tangent and so many more are there.

07:32.940 --> 07:35.970
So we just need to go ahead and do so many results.

07:36.000 --> 07:40.860
Check it out and play around with them because you might be using them anytime in your program.

07:40.860 --> 07:42.300
And that is very cool.

07:42.300 --> 07:44.910
So this is just introduce us to mass operators.

07:44.940 --> 07:49.500
And you can be able to see what are what we can do in PHP using this mass operators.

07:49.500 --> 07:53.760
For us to be able to know that PHP has this features in them.

07:53.790 --> 07:54.360
All right.

07:54.390 --> 07:55.770
So go ahead and play with this.

07:55.800 --> 07:56.610
Check it out.

07:56.640 --> 07:59.820
If you have any questions on this use the question and answer section.

07:59.820 --> 08:02.220
And I'm going to get back to you as soon as possible.

08:02.250 --> 08:03.120
Thank you so much.

08:03.120 --> 08:06.270
And I'm going to see you in the next video lecture.
