00:01
Hello, welcome to this lesson.
00:02
In this lesson, we have x is equal to 1 at the beginning of the execution of a programming instruction using the if then condition.
00:15
So here, the first part is if x plus 2 is equal to 3, then x is equal to x plus 1.
00:31
So what it simply means is that if this condition is true then increment x by 1 okay so let's test if it's true you have 1 plus the value of x at the initial stages 1 to 1 plus 2 is it equal to 3 and indeed that is equal to 3 it means that the value of x would be 1 plus 1 and that is equal to 2 so if this condition is true then control will be passed to this for x to be increment by 1.
01:16
Okay, so the value of x would be 2 at the end of the execution.
01:26
Let's go to the second one.
01:27
The second one is if x plus 1 is equal to 3 or or 2x plus 2 is equal to 3 then x is equal to x plus 1 so let's evaluate the first condition x plus 1 x is 1 to 1 plus 1 it's not equal to 3 it's rather equal to 2 so this condition is false let's look at whether the next condition is true so 2 so we have 2 times 1 that is 2 plus 2 that is 4 so it's not equal to 3.
02:24
So it means that control will not be transferred to this block for it to be executed.
02:37
The statement after that then will not be executed.
02:40
It means that the x will still maintain its value as one...