In this part will want to talk about conditions so you have the possibility of the ball to bid in conditions
so you print different parts or execute different parts of your code depending on this condition been
true or not.
And we look at a simple example we say Lou for this we can use both.
I believe that rebirths and with called a bust.
So want to see if somebody has burst and this example on we say it's true.
So somebody has burst and then we check if this variable contains two if this book contains true then
one to do something and all the simple example we want to just print out happy birthday and we would
like this.
We say If so if this is true we have two options to make this we can say if birthday
equals equals So two equals two check if this variable contains something so Burston does it contain
the following.
Does it contain truth.
So does the person in fact has first day if it's so we want to print something.
So we do our
job records.
I'm not sure whether it's called called shop records or Shaab records and want to print a string.
Happy birthday.
And if we run it then we get heavy busts.
So just if this is true if this variable this variable if this variable contains true then this gets
executed.
If it's not the case.
So if we make this false and then run it we don't see anything because this is false.
So this gets checked as false.
This is not true.
So this don't get printed out we have.
We can make this short or if we just ride to bursty so it automatically knows that this has to be true.
So it's just short form for this we can say if burster which means if both stay equal is true and run
it.
So nothing happens.
But if we change it to true then we say happy birthday again.
So this is if condition we can make big all make it more complex.
So for example you want to check if somebody has burst in and then print something odd but also if he
does not have a state print something on it so we can say edits and then make our shop records and say
prints.
Maybe not today or something and change this to false.
So this is false.
This false and all this gets checked first is not true therefore this is not getting printed.
Therefore this is getting printed and can run it.
And we see not today.
So and now with the possibility to make it even even more complex with different
different conditions.
But this is more likely done with an number for example.
And number and call it to then you can check easily check the same call on.
So we can check if number equates to and can print Allt
print out to for example and I make this a commentary for all cause you don't need it anymore.
So if this is true we print that too.
So exactly like we did it and our last example.
We can also check if it's not equal to two by making it
with an exclamation mark.
So this means if it's not equal to two then print all it's not equal to Saba
get nothing because it's it is too if you make it the screen gets like not equal to.
Yeah this can get like really complex.
One thing I just want to talk about is that you can check for a check for big or small on sort of the
number if number is bigger than two or so big or equal to.
So every seeing bigger or equal to then this gets printed.
Bigger or he were to run it they are all equal too.
So we get to one
and nothing happens so we can make this like really really complex.
And one thing we need to talk about is if as if where we can make like even more conditions so we have
if as if for example number
bigger or five zone we just Prince big-O equal five and then we can make as many as we want for example
we just say 10 and 15 10 15 10 and 15 and then we can make an outs and just print nothing.
You say just nothing so you run in it and you get nothing and then you can hear like look for the
different outcomes depending on on them.
And this may look a little bit intimidating and getting getting confusing.
But for Flora it's not that extreme you won't have to make like this big off of conditions.
So it's normally just just if adults for example Yeah and you you're you're all basically good to go
if you know if you know like like like these these basics and yet also gets clearer if you have done
that like some time yourself so maybe you can just play around with this a little bit and just make
some examples for surf.
Just play around with this if an absence of different conditions and you should not be too big of a
deal.