1
00:00:00,850 --> 00:00:04,810
Let me actually run my project and see what happens.

2
00:00:04,820 --> 00:00:09,800
So as you can see here it outputs this value to the console.

3
00:00:09,920 --> 00:00:13,440
This is the value of they can buy a car valuable farts.

4
00:00:13,460 --> 00:00:18,450
So as you can see this is the value of my Channa by car value.

5
00:00:18,460 --> 00:00:18,790
OK.

6
00:00:18,800 --> 00:00:20,180
False.

7
00:00:20,210 --> 00:00:25,800
So as you can see here I assigned the value of dollars to my can buy a car variable here.

8
00:00:25,820 --> 00:00:26,670
OK.

9
00:00:27,080 --> 00:00:33,190
And in like 24 I decided to output the value of this variable to the console.

10
00:00:33,440 --> 00:00:34,410
As you can see here.

11
00:00:34,520 --> 00:00:35,230
OK.

12
00:00:35,720 --> 00:00:41,780
So now I want to actually combine expressions together so let's see how we can do that in the previous

13
00:00:41,780 --> 00:00:49,600
example we just created one expression and we assigned the value of this expression to our boolean variable

14
00:00:49,610 --> 00:00:49,870
here.

15
00:00:49,920 --> 00:00:56,660
OK but now I want to actually combine two or three or four expressions together and then assign the

16
00:00:56,660 --> 00:00:59,560
value of those expressions to my variable.

17
00:00:59,570 --> 00:01:01,370
So let's see how we can do that.

18
00:01:01,370 --> 00:01:04,700
You can actually combine unlimited expressions together.

19
00:01:04,700 --> 00:01:05,310
OK.

20
00:01:05,480 --> 00:01:14,060
So now as you can see I want to assign another value to my can by car variable that I created in line

21
00:01:14,180 --> 00:01:18,010
23 can buy car.

22
00:01:18,200 --> 00:01:18,910
OK.

23
00:01:19,340 --> 00:01:25,370
And now I want to combine expressions together and then assign the value of those expressions to my

24
00:01:25,370 --> 00:01:26,580
Tran by card value.

25
00:01:26,600 --> 00:01:27,110
OK.

26
00:01:27,290 --> 00:01:30,890
So now I just need to put emphasis here.

27
00:01:31,340 --> 00:01:34,820
And that inside Apprentice's I want to create an expression.

28
00:01:34,820 --> 00:01:42,720
For example the value of my money valuable is greater than 500.

29
00:01:43,070 --> 00:01:43,620
OK.

30
00:01:43,800 --> 00:01:48,020
So and now I want to actually create another expression how I can do that.

31
00:01:48,020 --> 00:01:53,570
I cannot actually put another emphasis here and then put another explosion inside Apprentice's for example

32
00:01:53,570 --> 00:01:55,700
money is less than 50.

33
00:01:55,740 --> 00:01:56,280
OK.

34
00:01:56,330 --> 00:01:59,070
And put a semicolon at the end of my statement.

35
00:01:59,090 --> 00:02:02,140
So as you can see here is now showing us an error.

36
00:02:02,160 --> 00:02:06,230
Ok it cannot handle this value for us.

37
00:02:06,230 --> 00:02:13,370
So how we can actually deal with this problem we cannot actually put these two expressions together

38
00:02:13,970 --> 00:02:17,790
here and then assign the value of these two expressions to my variable.

39
00:02:17,960 --> 00:02:22,100
So the solution is to use logical operators.

40
00:02:22,490 --> 00:02:29,870
OK this is very important in programming that you should know how to use these logical operators in

41
00:02:29,870 --> 00:02:30,720
your programs.

42
00:02:30,820 --> 00:02:34,340
OK so now you want to actually use the and operator.

43
00:02:34,460 --> 00:02:41,720
So in order to actually use the and operator and combine two expressions together I just need to put

44
00:02:42,060 --> 00:02:46,040
2 and percent symbols between my expressions.

45
00:02:46,070 --> 00:02:46,630
OK.

46
00:02:46,760 --> 00:02:52,840
So as you can see here I put two ampersand symbols between my expressions.

47
00:02:52,910 --> 00:02:57,560
OK so what's the meaning of these two ampersand symbols here.

48
00:02:58,160 --> 00:03:05,990
I am telling the computer that the value of this money valuable must be greater than 500 in order to

49
00:03:05,990 --> 00:03:09,000
evaluate this expression to true.

50
00:03:09,310 --> 00:03:09,950
OK.

51
00:03:10,250 --> 00:03:14,640
So as you can see here the value of my money variable is 100 OK.

52
00:03:14,840 --> 00:03:18,060
And it is not greater than 500.

53
00:03:18,250 --> 00:03:18,710
OK.

54
00:03:18,830 --> 00:03:20,790
So it is less than 500.

55
00:03:20,790 --> 00:03:22,910
One hundred is less than 500.

56
00:03:22,910 --> 00:03:23,580
OK.

57
00:03:23,930 --> 00:03:28,020
So the value of this expression evaluates to false.

58
00:03:28,220 --> 00:03:31,190
So let me actually create a comment here for fots.

59
00:03:31,270 --> 00:03:32,280
OK.

60
00:03:32,930 --> 00:03:43,580
And here as you can see in this expression I am telling the computer that the value of the money variable

61
00:03:43,670 --> 00:03:46,380
must be less than 50 here.

62
00:03:46,490 --> 00:03:47,930
It doesn't make any sense.

63
00:03:47,930 --> 00:03:53,260
So let me actually change this value to 1000 for example.

64
00:03:53,660 --> 00:04:02,310
And here I am telling the computer that the value of the money variable must be less than 1000.

65
00:04:02,330 --> 00:04:02,920
OK.

66
00:04:03,320 --> 00:04:10,580
So as you can see here the value of my money value bet is 100 and it is less than 1000.

67
00:04:10,610 --> 00:04:14,610
So the value of the expression evaluates to TRUE.

68
00:04:15,500 --> 00:04:16,150
OK.

69
00:04:16,370 --> 00:04:21,890
So now Lydney actually outputs the value of this variable to the console and let's see what happens.

70
00:04:22,220 --> 00:04:28,340
So just typing here system that out that princeling.

71
00:04:28,850 --> 00:04:36,830
And then inside the apprentice's I just need to refer to the name of my variable can by car.

72
00:04:37,220 --> 00:04:37,910
OK.

73
00:04:38,420 --> 00:04:42,520
And then at the end of my statement I need to put in a semi-colon OK.

74
00:04:43,070 --> 00:04:53,100
So if I actually run my project as you can see the value of MY can buy charivari about is false here.

75
00:04:53,390 --> 00:05:00,330
OK so now let me actually comment out these lines of code here because I don't want to execute them.

76
00:05:00,410 --> 00:05:02,290
So if I run my project again.

77
00:05:02,330 --> 00:05:08,600
So as you can see it outputs the value of my can buy car valuable to the console for us.

78
00:05:08,750 --> 00:05:10,450
So let's see what's going on here.

79
00:05:10,940 --> 00:05:15,390
As you can see the value of this expression evaluates to false.

80
00:05:15,390 --> 00:05:15,890
Okay.

81
00:05:16,250 --> 00:05:19,440
And the value of the expression evaluates to TRUE.

82
00:05:19,820 --> 00:05:20,600
Okay.

83
00:05:20,940 --> 00:05:29,000
But because we are using the and operator here the value of these two expressions must evaluate to true

84
00:05:29,540 --> 00:05:38,360
in order to evaluate the value of the entire expression to true the value of this expression is false

85
00:05:38,810 --> 00:05:41,820
here and the value of this expression is true.

86
00:05:42,170 --> 00:05:50,330
The value of the entire expression evaluates to false and that false value will be assigned to or can

87
00:05:50,330 --> 00:05:51,370
buy Karadi of it.

88
00:05:51,460 --> 00:05:58,670
OK but so now as you can see the value of all can buy called variable is false.

89
00:05:58,790 --> 00:06:07,610
If you want to for example change the value of my money variable to 600 and if I run my project as you

90
00:06:07,610 --> 00:06:13,250
can see the value of my entire expression evaluates to true.

91
00:06:13,550 --> 00:06:16,550
So now this expression evaluates to TRUE.

92
00:06:16,790 --> 00:06:17,670
OK.

93
00:06:18,170 --> 00:06:24,960
The value of my entire expression evaluates to true and this value is now out to the council.

94
00:06:25,000 --> 00:06:25,490
Okay.

95
00:06:25,610 --> 00:06:29,180
So let me actually explain to you what's going on here.

96
00:06:29,230 --> 00:06:35,680
Here this expression evaluates to true because the value of the money value is greater than 500.

97
00:06:35,720 --> 00:06:39,530
And as you can see I am using the and logical operator here.

98
00:06:39,540 --> 00:06:40,360
OK.

99
00:06:41,060 --> 00:06:46,680
And the value of my money valuable is less than one thousand.

100
00:06:46,910 --> 00:06:47,550
OK.

101
00:06:47,840 --> 00:06:53,550
As you can see the value of my money variable is 600 and it is less than 1000.

102
00:06:53,720 --> 00:06:58,570
So the value of the entire expression evaluates to TRUE.

103
00:06:59,120 --> 00:06:59,930
Okay.

104
00:07:00,470 --> 00:07:05,440
So as you can see in the console the value of my entire expression evaluates to TRUE.

105
00:07:05,480 --> 00:07:06,000
Okay.

106
00:07:06,290 --> 00:07:15,010
But if I change the value of my money variable to 400 OK the value of this expression evaluates to false

107
00:07:15,020 --> 00:07:15,850
again.

108
00:07:16,300 --> 00:07:16,820
OK.

109
00:07:16,970 --> 00:07:17,340
Why.

110
00:07:17,360 --> 00:07:22,330
Because the value of the money variable is less than 500.

111
00:07:22,480 --> 00:07:31,130
OK here I am telling the computer that the value of the money variable must be greater than 500 in order

112
00:07:31,370 --> 00:07:35,280
to actually evaluate the value of the expression to true.

113
00:07:35,300 --> 00:07:43,040
But because the value of the money value is less than 500 as you can see here the value of the expression

114
00:07:43,040 --> 00:07:44,660
evaluates to false.

115
00:07:44,930 --> 00:07:45,610
OK.

116
00:07:46,010 --> 00:07:54,830
And because I am using the ant logical operator here the value of these two expressions must evaluate

117
00:07:54,830 --> 00:08:01,200
to true in order to actually evaluate the entire expression total.

118
00:08:01,400 --> 00:08:06,530
So as you can see in the console the value of my Chan by charivari about is false.

119
00:08:06,550 --> 00:08:07,100
Okay.

120
00:08:07,220 --> 00:08:12,110
And if I for example want to actually put another expression here.

121
00:08:12,170 --> 00:08:18,530
I just need to put him into ampersands and here I can actually put my statement inside Apprentice's

122
00:08:19,030 --> 00:08:20,690
money.

123
00:08:20,810 --> 00:08:24,710
For example less than 900.

124
00:08:25,200 --> 00:08:25,920
OK.

125
00:08:26,150 --> 00:08:33,300
And here I am telling the computer that the value of the money variable must be less than 100.

126
00:08:33,320 --> 00:08:33,700
OK.

127
00:08:33,710 --> 00:08:38,860
In order to actually evaluate the value of this expression to true.

128
00:08:38,900 --> 00:08:39,570
OK.

129
00:08:40,070 --> 00:08:48,710
So now if I run my project as you can see it is false the value of the expression is true because the

130
00:08:48,710 --> 00:08:54,150
value of that money variable is 400 and it is less than 900.

131
00:08:54,170 --> 00:09:01,270
OK so this expression evaluates to true but this expression evaluates to false because we are using

132
00:09:01,450 --> 00:09:09,500
and logical operators here and here the value of these free expressions must be true in order to actually

133
00:09:09,500 --> 00:09:12,300
evaluate the entire expression to true.

134
00:09:12,470 --> 00:09:13,820
OK.

135
00:09:13,820 --> 00:09:22,550
So as you can see if I actually change the value of this value about 2 for example 700 and if I run

136
00:09:22,550 --> 00:09:27,510
my project again the value of my can by car variable evaluates to TRUE.

137
00:09:27,580 --> 00:09:28,120
OK.

138
00:09:28,340 --> 00:09:31,880
Because the entire expression now evaluates to true.

139
00:09:32,150 --> 00:09:33,940
This expression evaluates to true.

140
00:09:34,100 --> 00:09:36,730
This expression evaluates to true as you can see here.

141
00:09:36,950 --> 00:09:38,990
And this expression evaluates to TRUE.

142
00:09:39,080 --> 00:09:39,960
OK.

143
00:09:40,280 --> 00:09:44,710
So now let me actually show you another example about using the OR.

144
00:09:44,720 --> 00:09:46,600
Operator OK.

145
00:09:47,420 --> 00:09:51,370
So let me actually comment out these lines of code here.

146
00:09:52,220 --> 00:09:52,700
OK.

