Now, the next thing I would like to look at are the if statements or how these statements are written
in Python.
So, as I said, this indentation language.
OK, so here we care about the indentation levels in here.
You will see how this works.
So let's imagine that we're driving a car.
OK, we're driving the car on the highway and our required speed is 100 miles per hour.
So this is the maximum speed speed we can drive with above the speed.
We're breaking the law.
But also, if you drive with under 20 miles per hour, then this means that you are driving too slow
and you are also not allowed to do this on the highway.
So if you would like to create some code that is checking that how we do it, well, we do this with
your statements.
So the first thing I will do is I will simply create a car.
Speed in here will add the value of our speed.
Let's say that our speed is a lot, 100 kilometers per hour.
Right.
And now let's create the same logic here and we can use for these statements.
So let's write if.
Car speeds is higher than a hundred miles per hour, actually will make our speed here to be equal to
70.
So if the car's speed is higher than 200 miles per hour, then you're right.
This symbol here and as you can see now, the line or the cursor is getting inside this if statement
and this, because if we're right outside of right here, then this will not be added as a condition
of this statement.
OK, so here we say the car's speed is higher than 100.
They would like to point to the driver you drive to.
First.
OK, and then since we're getting out of this if statement, we need to write on the same indentation
level and here I will say, oh, if so, here I want another condition.
So if something else happens, we'll write it by car.
Speed is more than 20 miles per hour, then I would like to present to the driver that he is driving
to slow.
So I will say you drive too slow.
This is a highway that's hit and in every other case or else anyone else for every other case.
So this means when the speed is not higher than 100 and it's not more than 20, then we can print.
Your speed is good.
OK, and then here I will just print a radio so you can see on the screen that we are ready with the
loop.
OK, now let's run the code and see what is going to happen.
So now, since our speed is 17, this means that our speed is good because it's between 20 and 100.
However, if the speed is higher than one hundred and then let's see what is going to be printed here,
you drive too fast.
If I reduce the speed to 10 miles per hour, then if we run the court, obviously our speed will be
to slow this highway.
And this is how you basically use the more simple case of these statements in your court in order to
decide between different conditions.