please translate any text, phrases, word, ... to persian and not summarized and noting any other and any message:
"WEBVTT

1
00:00:00.000 --> 00:00:03.400
In this video, you will learn about conditions and branching.

2
00:00:03.400 --> 00:00:07.150
Comparison operations compares some value or operand.

3
00:00:07.150 --> 00:00:09.330
Then based on some condition,

4
00:00:09.330 --> 00:00:10.830
they produce a Boolean.

5
00:00:10.830 --> 00:00:14.830
Let's say we assign a value of a to six.

6
00:00:14.830 --> 00:00:17.420
We can use the equality operator denoted with

7
00:00:17.420 --> 00:00:21.370
two equal signs to determine if two values are equal.

8
00:00:21.370 --> 00:00:24.660
In this case, if seven is equal to six.

9
00:00:24.660 --> 00:00:27.680
In this case, as six is not equal to seven,

10
00:00:27.680 --> 00:00:29.480
the result is false.

11
00:00:29.480 --> 00:00:32.890
If we performed an equality test for the value six,

12
00:00:32.890 --> 00:00:34.920
the two values would be equal.

13
00:00:34.920 --> 00:00:37.110
As a result, we would get a true.

14
00:00:37.110 --> 00:00:40.480
Consider the following equality comparison operator:

15
00:00:40.480 --> 00:00:43.490
If the value of the left operand, in this case,

16
00:00:43.490 --> 00:00:47.540
the variable i is greater than the value of the right operand,

17
00:00:47.540 --> 00:00:49.150
in this case five,

18
00:00:49.150 --> 00:00:52.890
the condition becomes true or else we get a false.

19
00:00:52.890 --> 00:00:55.770
Let's display some values for i on the left.

20
00:00:55.770 --> 00:01:00.340
Let's see the value is greater than five in green and the rest in red.

21
00:01:00.340 --> 00:01:02.810
If we set i equal to six,

22
00:01:02.810 --> 00:01:07.520
we see that six is larger than five and as a result, we get a true.

23
00:01:07.520 --> 00:01:10.860
We can also apply the same operations to floats.

24
00:01:10.860 --> 00:01:13.620
If we modify the operator as follows,

25
00:01:13.620 --> 00:01:19.210
if the left operand i is greater than or equal to the value of the right operand,

26
00:01:19.210 --> 00:01:20.720
in this case five,

27
00:01:20.720 --> 00:01:22.780
then the condition becomes true.

28
00:01:22.780 --> 00:01:24.960
In this case, we include the value of

29
00:01:24.960 --> 00:01:28.960
five in the number line and the color changes to green accordingly.

30
00:01:28.960 --> 00:01:31.900
If we set the value of i equal to five,

31
00:01:31.900 --> 00:01:34.180
the operand will produce a true.

32
00:01:34.180 --> 00:01:36.750
If we set the value of i to two,

33
00:01:36.750 --> 00:01:39.900
we would get a false because two is less than five.

34
00:01:39.900 --> 00:01:44.470
We can change the inequality if the value of the left operand, in this case,

35
00:01:44.470 --> 00:01:47.590
i is less than the value of the right operand,

36
00:01:47.590 --> 00:01:49.480
in this case, six.

37
00:01:49.480 --> 00:01:51.500
Then condition becomes true.

38
00:01:51.500 --> 00:01:54.870
Again, we can represent this with a colored number line.

39
00:01:54.870 --> 00:01:57.910
The areas where the inequality is true are marked in

40
00:01:57.910 --> 00:02:01.250
green and red where the inequality is false.

41
00:02:01.250 --> 00:02:03.810
If the value for i is set to two,

42
00:02:03.810 --> 00:02:05.390
the result is a true.

43
00:02:05.390 --> 00:02:07.770
As two is less than six.

44
00:02:07.770 --> 00:02:12.630
The inequality test uses an explanation mark preceding the equal sign.

45
00:02:12.630 --> 00:02:15.030
If two operands are not equal,

46
00:02:15.030 --> 00:02:17.140
then the condition becomes true.

47
00:02:17.140 --> 00:02:18.940
We can use a number line.

48
00:02:18.940 --> 00:02:20.850
When the condition is true,

49
00:02:20.850 --> 00:02:26.390
the corresponding numbers are marked in green and red for where the condition is false.

50
00:02:26.390 --> 00:02:28.840
If we set i equal to two,

51
00:02:28.840 --> 00:02:32.900
the operator is true as two is not equal to six.

52
00:02:32.900 --> 00:02:34.960
We compare strings as well.

53
00:02:34.960 --> 00:02:40.170
Comparing ACDC and Michael Jackson using the equality test,

54
00:02:40.170 --> 00:02:43.460
we get a false, as the strings are not the same.

55
00:02:43.460 --> 00:02:45.520
Using the inequality test,

56
00:02:45.520 --> 00:02:48.440
we get a true, as the strings are different.

57
00:02:48.440 --> 00:02:50.880
See the Lapps for more examples.

58
00:02:50.880 --> 00:02:55.010
Branching allows us to run different statements for a different input.

59
00:02:55.010 --> 00:02:58.920
It's helpful to think of an if statement as a locked room.

60
00:02:58.920 --> 00:03:00.670
If this statement is true,

61
00:03:00.670 --> 00:03:05.360
you can enter the room and your program can run some predefined task.

62
00:03:05.360 --> 00:03:07.070
If the statement is false,

63
00:03:07.070 --> 00:03:09.230
your program will skip the task.

64
00:03:09.230 --> 00:03:15.200
For example, consider the blue rectangle representing an ACDC concert.

65
00:03:15.200 --> 00:03:17.780
If the individual is 18 or older,

66
00:03:17.780 --> 00:03:20.240
they can enter the ACDC concert.

67
00:03:20.240 --> 00:03:22.230
If they are under the age of 18,

68
00:03:22.230 --> 00:03:24.040
they cannot enter the concert.

69
00:03:24.040 --> 00:03:28.100
Individual proceeds to the concert their age is 17,

70
00:03:28.100 --> 00:03:33.300
therefore, they are not granted access to the concert and they must move on.

71
00:03:33.300 --> 00:03:35.420
If the individual is 19,

72
00:03:35.420 --> 00:03:36.790
the condition is true.

73
00:03:36.790 --> 00:03:39.970
They can enter the concert then they can move on.

74
00:03:39.970 --> 00:03:44.070
This is the syntax of the if statement from our previous example.

75
00:03:44.070 --> 00:03:45.930
We have the if statement.

76
00:03:45.930 --> 00:03:49.080
We have the expression that can be true or false.

77
00:03:49.080 --> 00:03:52.750
The brackets are not necessary. We have a colon.

78
00:03:52.750 --> 00:03:57.480
Within an indent, we have the expression that is run if the condition is true.

79
00:03:57.480 --> 00:04:00.190
The statements after the if statement will run

80
00:04:00.190 --> 00:04:03.100
regardless if the condition is true or false.

81
00:04:03.100 --> 00:04:05.440
For the case where the age is 17,

82
00:04:05.440 --> 00:04:08.750
we set the value of the variable age to 17.

83
00:04:08.750 --> 00:04:10.570
We check the if statement,

84
00:04:10.570 --> 00:04:12.270
the statement is false.

85
00:04:12.270 --> 00:04:17.140
Therefore the program will not execute the statement to print, "you will enter".

86
00:04:17.140 --> 00:04:20.420
In this case, it will just print "move on".

87
00:04:20.420 --> 00:04:22.530
For the case where the age is 19,

88
00:04:22.530 --> 00:04:25.480
we set the value of the variable age to 19.

89
00:04:25.480 --> 00:04:27.290
We check the if statement.

90
00:04:27.290 --> 00:04:28.810
The statement is true.

91
00:04:28.810 --> 00:04:33.060
Therefore, the program will execute the statement to print "you will enter".

92
00:04:33.060 --> 00:04:35.660
Then it will just print "move on".

93
00:04:35.660 --> 00:04:40.830
The else statement will run a different block of code if the same condition is false.

94
00:04:40.830 --> 00:04:44.320
Let's use the ACDC concert analogy again.

95
00:04:44.320 --> 00:04:46.060
If the user is 17,

96
00:04:46.060 --> 00:04:48.930
they cannot go to the ACDC concert but they

97
00:04:48.930 --> 00:04:52.670
can go to the Meat Loaf concert represented by the purple square.

98
00:04:52.670 --> 00:04:54.710
If the individual is 19,

99
00:04:54.710 --> 00:04:55.980
the condition is true,

100
00:04:55.980 --> 00:05:00.640
they can enter the ACDC concert then they can move on as before.
"