WEBVTT

00:00.300 --> 00:01.710
If else statements

00:05.530 --> 00:15.360
if else statements it's really important to know if else statements and if statement is an expression

00:15.360 --> 00:21.460
that you test conditions on return either true or false.

00:21.720 --> 00:29.470
When if a statement returned true it will execute the statement that you want it to execute.

00:29.920 --> 00:36.310
But if it's returning false it will now going to execute the statement.

00:37.530 --> 00:44.520
Let's see how first we go to brackets.

00:46.380 --> 00:50.810
And now let's create a variable called far as an example.

00:50.930 --> 00:52.880
And they all it with 10.

00:53.090 --> 00:55.890
OK I will use every statement.

00:56.120 --> 01:07.380
You know if bar is equal 10 or not as you can see here a row is var equal equal 10 call.

01:08.040 --> 01:18.210
So this equal equal operator returns true if the values on the left are right side of the operator match

01:18.900 --> 01:20.400
and returns false.

01:20.430 --> 01:26.520
If they don't match them print a string such as var equals then

01:36.750 --> 01:43.770
this print line is a line because it came after F.

01:43.770 --> 01:47.730
Now I will use else when you write tails.

01:47.880 --> 01:54.260
Please do not put in then because else is nine inside the F so right.

01:54.280 --> 01:57.800
Else Kallen else here will execute.

01:58.050 --> 02:01.060
When the F expression is not true.

02:01.360 --> 02:05.970
After that think another string such as follows.

02:06.150 --> 02:19.250
You.

02:21.200 --> 02:23.430
Try that long term

02:36.140 --> 02:37.730
as you can see here.

02:37.730 --> 02:42.750
If expression is true and printed out bar is equal 10.

02:43.130 --> 02:49.010
But if we change far good and the number as example S-expression will execute.

02:49.010 --> 02:51.730
Try that on terminal and see

02:54.870 --> 03:06.170
nice because if a statement is false so that El-Soo statement works and says var is not equal then that's

03:06.170 --> 03:07.340
it for now.

03:07.400 --> 03:08.600
Thank you very much.
