1
00:00:00,210 --> 00:00:05,220
So let's change this, let's try and get it to just around this, so if I say.

2
00:00:06,270 --> 00:00:08,460
Let's actually change these variables, so.

3
00:00:12,050 --> 00:00:19,370
I to say I want is five I two is 10, five is not greater than or equal to two.

4
00:00:19,490 --> 00:00:21,050
So let's go ahead and run this.

5
00:00:23,540 --> 00:00:26,300
And I want to change this to.

6
00:00:28,520 --> 00:00:38,420
Say that again, and I'm actually coming to this compile, it helps run it.

7
00:00:38,900 --> 00:00:45,170
And you notice now it only says i1 is not greater than or equal to i2 because this was false.

8
00:00:45,740 --> 00:00:53,390
So when it saw that this was false, basically skipped over this, these curly braces, whatever in

9
00:00:53,390 --> 00:01:00,170
between these curly braces and went to here and it saw the else and I said, OK, this was false.

10
00:01:00,170 --> 00:01:03,770
I'm going to run whatever is inside of the ealth, and it ran this line right here.

11
00:01:06,460 --> 00:01:12,580
All right, so pretty cool now we have a means to kind of do one thing if something's true and if it's

12
00:01:12,580 --> 00:01:16,010
not true, if it's false, and then we can do this other separate thing.

13
00:01:17,130 --> 00:01:21,900
So you can see how this can be pretty handy to implement some logic in your code.

14
00:01:24,700 --> 00:01:31,090
So now let's look at something called the health if.

15
00:01:33,470 --> 00:01:39,680
So that's kind of like the LS, but it's whenever this is false.

16
00:01:40,850 --> 00:01:47,540
Maybe we don't want to just immediately jump straight to printing this out.

17
00:01:49,330 --> 00:01:56,560
Like some else condition, maybe when we realize that this is not true, we're like, Hmm, OK, well,

18
00:01:56,560 --> 00:02:03,410
this isn't true, but what if now I want to check if something else is true about about these like?

19
00:02:03,640 --> 00:02:06,790
It doesn't have to be about these variables, but maybe you want to check for another condition.

20
00:02:07,000 --> 00:02:07,300
All right.

21
00:02:07,300 --> 00:02:09,370
Well, this failed.

22
00:02:09,820 --> 00:02:10,570
It's false.

23
00:02:10,960 --> 00:02:15,310
But now I want to check for something else to see if that is true and then I can print something out.

24
00:02:18,060 --> 00:02:22,740
So you can say, like are not true.

25
00:02:23,130 --> 00:02:23,580
You know?

26
00:02:25,510 --> 00:02:31,300
And but then maybe your let's see I one greater than.

27
00:02:34,230 --> 00:02:39,800
I want greater than I three try and make an interesting example here, so I won and I three again,

28
00:02:39,810 --> 00:02:41,400
they're both five, so I'm like, Hmm.

29
00:02:41,640 --> 00:02:42,930
So I won greater than nine three.

30
00:02:43,920 --> 00:02:46,650
Well, it's not going to be because they're both five.

31
00:02:47,040 --> 00:02:48,130
But then I say, all right.

32
00:02:48,130 --> 00:02:53,520
Or else if I won equal to three

33
00:02:56,730 --> 00:03:00,210
and then I shouldn't put.

34
00:03:00,210 --> 00:03:00,930
Not true here.

35
00:03:00,930 --> 00:03:01,300
Sorry.

36
00:03:02,570 --> 00:03:03,630
It's cool.

37
00:03:05,880 --> 00:03:07,230
It's true.

38
00:03:10,000 --> 00:03:16,990
And then maybe here, like, OK, at least at least this one is true.

39
00:03:21,530 --> 00:03:24,660
Oh, oh, so

40
00:03:27,730 --> 00:03:30,700
so I oriented.

41
00:03:33,200 --> 00:03:33,800
Let's do that.

42
00:03:35,390 --> 00:03:37,860
OK, so now we kind of expanded upon it.

43
00:03:38,270 --> 00:03:40,860
So we have this if right here.

44
00:03:41,660 --> 00:03:44,470
If I one is greater than I three.

45
00:03:45,560 --> 00:03:52,010
So we have these are both five, you know, this, if this was true in print this out, but it's not.

46
00:03:52,370 --> 00:03:55,670
So then it goes down to here on 18 and it says, All right.

47
00:03:56,730 --> 00:03:59,430
This is the thing that was above me.

48
00:04:01,270 --> 00:04:02,230
Was false.

49
00:04:02,260 --> 00:04:06,430
So whatever was above the elusive was false.

50
00:04:07,330 --> 00:04:13,630
So it made it to here and now it's going to check another condition and says, OK, is I one equal to

51
00:04:13,840 --> 00:04:14,170
three?

52
00:04:15,580 --> 00:04:22,990
And it is right there, both five, so it'll goad into the block of code here with these curly bases,

53
00:04:22,990 --> 00:04:27,550
and it will run whatever's in between the curly braces, which right now it's just one line and say,

54
00:04:27,550 --> 00:04:32,650
Oh, OK, at least this one's true and it will print it out and we'll put it in line there as well.

55
00:04:34,900 --> 00:04:37,210
If this happened to also be false.

56
00:04:37,390 --> 00:04:39,040
So I'll say this is false.

57
00:04:39,130 --> 00:04:42,010
Then it checks this and this is false, too.

58
00:04:42,460 --> 00:04:45,400
Then I'll just go down here and it will just run this else.

59
00:04:47,860 --> 00:04:50,140
All right, so let's go ahead and test this out.

60
00:04:55,310 --> 00:04:57,950
So it does, OK, at least this one is true.

61
00:04:58,490 --> 00:05:03,740
So it ended up coming to here because this was true, this was false and said, All right.

62
00:05:03,770 --> 00:05:04,730
Not going to be able to run.

63
00:05:04,730 --> 00:05:07,050
There's going to have to go down to the next part.

64
00:05:07,060 --> 00:05:11,840
So I pass these little curly braces and I go to here, says elseif.

65
00:05:11,870 --> 00:05:14,930
OK, that means I'm going to check another condition.

66
00:05:14,930 --> 00:05:17,000
So what's what's the condition in here?

67
00:05:17,450 --> 00:05:19,340
I want equals equals I three.

68
00:05:19,370 --> 00:05:20,510
So are they the same?

69
00:05:21,110 --> 00:05:21,610
Hmm.

70
00:05:21,740 --> 00:05:23,000
They're both five.

71
00:05:23,270 --> 00:05:24,700
Yeah, that's the same thing.

72
00:05:24,710 --> 00:05:27,290
So I'm going to enter inside of the curly braces.

73
00:05:27,920 --> 00:05:33,110
I'm going to do whatever is in here which says to printout out, OK, at least this one is true.

74
00:05:35,210 --> 00:05:45,020
Now, let's say, you know, chances to not equal, so if it's greater than else, if I were not equal

75
00:05:45,020 --> 00:05:47,780
to three, which you know is false, they are equal.

76
00:05:48,770 --> 00:05:50,030
So what's going to happen now?

77
00:05:54,260 --> 00:06:00,050
So it ended up coming down here because this was false and it's like, Oh shucks, I got to come down

78
00:06:00,050 --> 00:06:04,070
here and it came to this and it said, Oh, this is false, too.

79
00:06:04,100 --> 00:06:08,300
So then it came down and it said, Oh, that's just me, and I'm going to run this no matter what,

80
00:06:08,300 --> 00:06:09,260
in between here.

81
00:06:09,830 --> 00:06:12,410
And it went ahead and it ran this print in this.

82
00:06:14,540 --> 00:06:22,580
So a cool thing is that you are not limited to having one elf in between the if in the Elf, you can

83
00:06:22,580 --> 00:06:25,700
have multiple conditions that you check.

84
00:06:27,740 --> 00:06:34,640
So you can say if I one equals equals five.

85
00:06:38,490 --> 00:06:44,330
Then you could say, yeah, cool, it's easy.

86
00:06:44,650 --> 00:06:49,500
It's equal time to five.

87
00:06:54,050 --> 00:06:57,560
So this is another LCF condition that I can throw in here.

88
00:06:58,220 --> 00:06:59,720
So go ahead and say this.

89
00:07:01,730 --> 00:07:05,030
And it does cool, it's equal to five because it is equal to five.

90
00:07:05,900 --> 00:07:06,230
Right?

91
00:07:07,570 --> 00:07:12,250
Another important thing to notice, though, is what happens if.

92
00:07:13,660 --> 00:07:19,960
This is sorry if this is true, but then what if this is also true?

93
00:07:21,820 --> 00:07:28,030
What happens then, let's go ahead and just test it out, and then I'll explain some changes back to

94
00:07:28,030 --> 00:07:29,080
equal equal, right?

95
00:07:30,040 --> 00:07:37,180
Because I want is equal to five and it's basically five is equal to five, I want is equal to three.

96
00:07:37,180 --> 00:07:40,780
And then we're kind of saying the same thing here, but differently, we're saying, I want equal equal

97
00:07:40,780 --> 00:07:41,110
five.

98
00:07:42,870 --> 00:07:45,840
So this is true, but this is also true.

99
00:07:47,310 --> 00:07:49,110
So let's see what actually, Prince.

100
00:07:53,590 --> 00:07:58,270
So only this one printed cool, it's equal to five.

101
00:07:59,660 --> 00:08:01,850
This one did not print, even though it was true.

102
00:08:02,510 --> 00:08:04,250
So look, it is, why did that not print?

103
00:08:04,670 --> 00:08:11,530
Well, the reason it didn't is because it stops at the first thing.

104
00:08:11,540 --> 00:08:12,320
That is true.

105
00:08:13,130 --> 00:08:16,910
So if this first if is false.

106
00:08:17,120 --> 00:08:18,670
So check this out.

107
00:08:18,670 --> 00:08:19,190
It's false.

108
00:08:19,190 --> 00:08:24,140
It says, OK, I'm going to the next one, and it says this is true.

109
00:08:24,800 --> 00:08:27,200
It says, Oh great, I'm going to run what's in here.

110
00:08:27,230 --> 00:08:32,330
And then once I'm done running, what's in here and I get to this, I'm just going to skip over all

111
00:08:32,330 --> 00:08:36,230
the next Ellsworth's and ELSS and go to down here.

112
00:08:37,150 --> 00:08:38,680
And just see whatever's next.

113
00:08:39,340 --> 00:08:45,850
Because once one of these is true, it just does it and it doesn't do the rest.

114
00:08:47,590 --> 00:08:50,890
If you want multiple things.

115
00:08:51,850 --> 00:08:53,110
To be able to.

116
00:08:54,220 --> 00:08:54,850
Run.

117
00:08:55,210 --> 00:09:00,280
You need to like if multiple, if you want multiple conditions to be able to run like this is true.

118
00:09:00,910 --> 00:09:07,420
And this is also true and you want them both to print, you do not want to use the else if you just

119
00:09:07,420 --> 00:09:13,270
want to use the if by itself, because there is no else, there is no otherwise.

120
00:09:13,270 --> 00:09:19,570
You're not doing like an otherwise thing in either either or kind of thing like you just do the LCF

121
00:09:19,570 --> 00:09:25,060
kind of imply it's like, OK, I just want you to, you know, do exclusively do one of these.

122
00:09:26,320 --> 00:09:30,010
But if you want them to potentially do multiple ones, then you need to leave it as an if.

123
00:09:31,590 --> 00:09:36,300
So if I change this back to if then it only looks at this one.

124
00:09:37,410 --> 00:09:43,830
Chunk without considering the rest of like them being connected.

125
00:09:44,130 --> 00:09:46,410
It's almost like a standalone question.

126
00:09:47,650 --> 00:09:49,810
It's like if you ask someone.

127
00:09:51,780 --> 00:09:57,120
You know, OK, is this is the sky blue.

128
00:09:58,530 --> 00:10:04,080
And they're like, yeah, it's blue, and then so the next question that you had in line was, is the

129
00:10:04,080 --> 00:10:05,280
sky, not blue?

130
00:10:06,510 --> 00:10:11,340
And like logically, you don't need to even ask that question anymore, right, because someone already

131
00:10:11,340 --> 00:10:14,070
told you the sky is blue, so why ask if it's not blue?

132
00:10:14,100 --> 00:10:14,970
It's blatantly blue.

133
00:10:15,210 --> 00:10:20,640
That's kind of like an LCF mentality like, you know, I'm having a look at the next one or something

134
00:10:20,640 --> 00:10:21,120
like that.

135
00:10:21,690 --> 00:10:27,000
But but if you're just doing the if it's kind of just looking at one question at a time without considering

136
00:10:27,000 --> 00:10:29,670
the next questions, like, is the sky blue?

137
00:10:30,540 --> 00:10:32,700
That's all I care about answering this guy blue.

138
00:10:32,700 --> 00:10:36,690
And it's like, Yes, the sky is blue and you're like, OK, I don't even I'm not even thinking about

139
00:10:36,960 --> 00:10:39,060
what that answer means in the context.

140
00:10:39,060 --> 00:10:41,340
I'm just going to go to my next question What's the next question?

141
00:10:41,340 --> 00:10:42,470
Is the sky not blue?

142
00:10:42,480 --> 00:10:43,980
And you just ask the question again?

143
00:10:45,320 --> 00:10:51,110
Seems kind of a ridiculous example, but it's kind of the analogy that popped into my head at one so.

144
00:10:52,860 --> 00:10:59,040
If you want to ask these kind of independently and run the code solely, run the code inside solely

145
00:10:59,040 --> 00:11:04,130
based on this one condition not linked to anything else, then you can put these efforts.

146
00:11:04,200 --> 00:11:05,610
So let's go ahead and try this.

147
00:11:06,510 --> 00:11:10,920
Now this, you're probably wondering what happens with the elephants in the relationship with the health?

148
00:11:11,190 --> 00:11:15,510
Now the else is just attached to the if it's above it.

149
00:11:16,820 --> 00:11:21,080
So basically, if this is false, this will run.

150
00:11:23,300 --> 00:11:27,320
But you know this if in this, if are independent of each other.

151
00:11:27,380 --> 00:11:28,100
Same with this.

152
00:11:28,100 --> 00:11:29,580
They're all independent of each other.

153
00:11:29,630 --> 00:11:33,590
They're all just going to run this code solely if this is true.

154
00:11:33,620 --> 00:11:36,260
There's no like exclusively only running one thing.

155
00:11:37,550 --> 00:11:39,140
Let's go ahead and save it and run it.

156
00:11:42,370 --> 00:11:50,530
So now we see that cool, it's equal to five and that, OK, at least this one is true, right?

157
00:11:52,390 --> 00:11:59,110
Because those were both to I want is equal to five, and I want to equal that three because I three

158
00:11:59,110 --> 00:11:59,860
is also five.

159
00:12:02,440 --> 00:12:02,650
Cool.

160
00:12:02,760 --> 00:12:04,320
So I'm going to go ahead and change these back.

161
00:12:06,590 --> 00:12:10,280
So if I have this is an elusive as well, it will not.

162
00:12:11,990 --> 00:12:16,520
You know, I don't need these to both be Alsace for only one of them to run.

163
00:12:16,520 --> 00:12:23,990
The fact that I just believe this is an LCF, it's exclusively, you know, kind of has to be one of

164
00:12:23,990 --> 00:12:24,170
these.

165
00:12:24,170 --> 00:12:25,520
So this is false.

166
00:12:26,860 --> 00:12:34,150
It'll check this, but if this is true, it's just going to skip over these next two ones because now

167
00:12:34,150 --> 00:12:35,440
they're kind of all connected.

168
00:12:37,090 --> 00:12:43,540
So once one of them is true, it just bails on the rest of them and skips over the rest of them because

169
00:12:43,540 --> 00:12:46,330
now they're kind of all in a line, it's an f elseif else.

170
00:12:47,390 --> 00:12:48,530
This is true.

171
00:12:48,950 --> 00:12:55,700
So it is not going to care about this or this, it's just going to be like, All right, cool, is he

172
00:12:55,700 --> 00:12:56,180
going to five?

173
00:12:56,180 --> 00:12:57,680
I printed that I got here.

174
00:12:57,680 --> 00:13:00,170
I'm going to skip over these because this is an elusive and else.

175
00:13:00,170 --> 00:13:01,340
I don't need to look at this.

176
00:13:02,080 --> 00:13:03,200
Let's go ahead and prove that.

177
00:13:07,070 --> 00:13:11,060
So you notice that it just prints cool.

178
00:13:11,660 --> 00:13:13,790
It's equal to five.

179
00:13:15,280 --> 00:13:20,400
So we ran it, and it only printed that even though this was true, it did not print it.

180
00:13:22,120 --> 00:13:27,070
Same thing if I change this tune and it's basically just starting it here at this point and now they're

181
00:13:27,070 --> 00:13:29,080
all connected together.

182
00:13:30,500 --> 00:13:35,030
Right here, so if this is true, it wouldn't run any of the rest of this.

183
00:13:36,760 --> 00:13:41,050
If this is true, it's not going to run any of the rest below it.

184
00:13:42,620 --> 00:13:46,820
You know, if this is true, it's not going to run any of the rest below, it should just be there.

185
00:13:47,720 --> 00:13:49,450
So that's kind of how it works with the elusive.

186
00:13:52,020 --> 00:13:56,820
OK, so definitely pretty cool concept, really powerful.

187
00:13:57,150 --> 00:14:05,400
Good thing to know how to use, you're going to use a ton of this logic inside of your programs, and

188
00:14:05,400 --> 00:14:09,450
there are some ways to condense this which we will talk about in future lectures.

189
00:14:09,480 --> 00:14:11,310
You don't have to have so much code.

190
00:14:11,850 --> 00:14:17,280
You can actually kind of condense all of it into a single line.

191
00:14:18,090 --> 00:14:22,830
That's something that you might have already noticed and see life.

192
00:14:22,830 --> 00:14:28,740
And I think I actually showed you you didn't really go into it much, but I think I showed you in the

193
00:14:28,740 --> 00:14:34,710
Sea Lion lecture about just using sea lion in general, that it gives you a little light bulbs and it

194
00:14:34,710 --> 00:14:36,690
gives you the option to condense all this.

195
00:14:37,650 --> 00:14:45,290
Into something called say, it's hard to fly all this dynamically like that, but it'll highlight all

196
00:14:45,310 --> 00:14:45,690
this.

197
00:14:46,690 --> 00:14:50,910
I'm sorry it'll take all of this thinking condense into something called a ternary, and that's just

198
00:14:50,910 --> 00:14:53,120
kind of a nice thing and sea lion that it can do for you.

199
00:14:53,130 --> 00:14:58,740
But we'll talk about 10 days later and no need to talk about squishing the code to something smaller

200
00:14:59,400 --> 00:15:03,750
quite yet when we're really just trying to get our wrap our minds around this concept, right?

201
00:15:05,470 --> 00:15:11,290
So there are some more operators that we will need to go over.

202
00:15:12,460 --> 00:15:19,870
This is kind of a lengthy lecture, so I'm not going to dive into those right now.

203
00:15:19,900 --> 00:15:25,960
We kind of just covered the highlighted ones here, but we need to look at adding numbers, subtracting

204
00:15:25,960 --> 00:15:33,150
numbers, dividing them, and that opens up a whole new class of operators called arithmetic operators.

205
00:15:33,220 --> 00:15:39,670
So kind of like math operators, these are math to right, but they're like logical math kind of like

206
00:15:39,670 --> 00:15:44,710
discrete math if you take in that proposition of logic and all that stuff.

207
00:15:45,580 --> 00:15:48,730
We're also going to look at those arithmetic operators, though, because those are really important,

208
00:15:48,730 --> 00:15:49,010
right?

209
00:15:49,030 --> 00:15:53,800
We need to like multiplying and divide things because a lot of times we're dealing with like numerical

210
00:15:53,800 --> 00:15:55,600
data in programming, right?

211
00:15:56,230 --> 00:16:01,840
So we'll have to do that in another lecture because I don't want to just go forever and ever and stuff

212
00:16:01,840 --> 00:16:09,130
too much into your brain with one lecture, but definitely practice these as much as you can mate train

213
00:16:09,130 --> 00:16:11,710
compound like larger conditions.

214
00:16:12,850 --> 00:16:20,710
With what I mean is put more stuff in here, so like put parentheses around things like this and and

215
00:16:20,710 --> 00:16:28,450
in all them together and just experiment and see if you can see like what the most complex line of logic

216
00:16:28,450 --> 00:16:29,380
you can make is.

217
00:16:29,380 --> 00:16:32,650
So make a bunch of variables and be like parentheses.

218
00:16:32,670 --> 00:16:37,990
I want greater than equal to three and this or that.

219
00:16:39,410 --> 00:16:42,290
You know, and try and really put them all together.

220
00:16:42,710 --> 00:16:46,780
So one thing, though, actually hopefully you haven't failed already on the lecture I do.

221
00:16:46,780 --> 00:16:52,250
I just realized I do want to point out one more thing that is pretty interesting and important, and

222
00:16:52,250 --> 00:16:55,010
that is kind of what happens.

223
00:16:55,100 --> 00:16:56,450
I'm going to go ahead and delete this.

224
00:16:57,430 --> 00:16:58,210
The LCF.

225
00:16:59,390 --> 00:16:59,790
I.

226
00:17:03,680 --> 00:17:11,930
So I'm just going to leave this Earth, and something that's kind of interesting is.

227
00:17:13,340 --> 00:17:17,150
What an integer really holds is a Boolean value.

228
00:17:17,480 --> 00:17:24,380
So we have some integers here, but there's something kind of interesting about C++ where I can you

229
00:17:24,380 --> 00:17:28,070
know how I just put b one in here, like if B one?

230
00:17:29,670 --> 00:17:31,470
And it was it was true.

231
00:17:31,890 --> 00:17:36,840
So it evaluated whatever it was in between this parentheses to true and it ran it, and that's just

232
00:17:36,840 --> 00:17:40,140
because the Boolean held the true value.

233
00:17:40,140 --> 00:17:44,760
So it was the same thing as making some type of statement like larger statement that evaluates to true

234
00:17:44,760 --> 00:17:45,410
or false, right?

235
00:17:46,680 --> 00:17:50,490
You can actually just put the integer in here, though, which is kind of weird.

236
00:17:51,720 --> 00:17:53,730
So I can just put I in here.

237
00:17:55,290 --> 00:17:57,570
And let's go ahead and save this and run it.

238
00:17:59,700 --> 00:18:08,010
And to see what happens in this year, so I'm going to compile this, I'm going to run it.

239
00:18:09,860 --> 00:18:10,910
Weird enough.

240
00:18:11,000 --> 00:18:13,640
It prints cool, it's true here.

241
00:18:14,500 --> 00:18:20,020
And when I literally just put I want in here and this is pretty funky, right, because I want it's

242
00:18:20,020 --> 00:18:25,800
just a number, it's just asking if it's like if five, I mean, that doesn't make any sense, right?

243
00:18:25,810 --> 00:18:29,980
If you say that to someone, I mean, five is not a true or a false.

244
00:18:31,080 --> 00:18:40,710
But it actually is in C++, the way the C++ looks at it is anything that is not a zero.

245
00:18:41,910 --> 00:18:44,580
Is evaluated in a logical sense.

246
00:18:45,590 --> 00:18:47,120
To True.

247
00:18:48,440 --> 00:18:50,210
So I can't even put the number in here.

248
00:18:51,050 --> 00:18:56,000
I don't need to put I one I one has a value five, but let me just put the value five directly into

249
00:18:56,000 --> 00:18:58,910
here by compile it again.

250
00:18:58,910 --> 00:19:00,410
I've already saved it and I run.

251
00:19:00,410 --> 00:19:01,460
It is still prince.

252
00:19:03,210 --> 00:19:10,440
So what I said was that it basically evaluates everything that's not zero to true if it's an integer,

253
00:19:11,040 --> 00:19:15,180
so I'll put a zero in here and I'll show you that right now.

254
00:19:19,530 --> 00:19:21,960
You notice nothing prints now because it's zero.

255
00:19:23,610 --> 00:19:30,990
So interesting enough, it's not only these positive numbers like you can put a negative five here.

256
00:19:30,990 --> 00:19:32,220
So this is signed, right?

257
00:19:33,610 --> 00:19:35,880
I save it, run it.

258
00:19:37,260 --> 00:19:40,260
It even prints out for that when I put it negative five in there.

259
00:19:40,260 --> 00:19:41,220
How weird was that?

260
00:19:41,940 --> 00:19:47,610
And it's kind of like, you know, we'll talk more about these operators and stuff like this.

261
00:19:49,500 --> 00:19:50,640
So here, let me do it.

262
00:19:50,650 --> 00:19:54,600
I four equals negative five.

263
00:19:58,280 --> 00:19:59,140
Let's do an eye for.

264
00:20:03,040 --> 00:20:09,930
You notice that still prints and put aside for hearing is as negative five and still prints, so any

265
00:20:09,930 --> 00:20:14,100
new integer that is not a zero is seen as true.

266
00:20:14,110 --> 00:20:16,630
So that's something interesting to remember to remember.

267
00:20:16,930 --> 00:20:22,120
We also have these like, you know, chars see,

268
00:20:25,420 --> 00:20:28,430
makes char variables.

269
00:20:28,750 --> 00:20:30,850
And I'll just say char.

270
00:20:33,870 --> 00:20:37,230
A equals a, you know, kind of weird, but.

271
00:20:38,670 --> 00:20:39,720
Let's just say.

272
00:20:43,100 --> 00:20:45,500
I put a in here, so if a.

273
00:20:50,620 --> 00:20:57,190
And you notice this still, Prince, because it's looking at that no value of a when you look at like

274
00:20:57,190 --> 00:21:05,800
the Askia, the ASCII table member that showed you hex numbers that have to deal with it and decimal

275
00:21:05,800 --> 00:21:06,130
numbers.

276
00:21:06,130 --> 00:21:09,970
So when I say deal with it, I mean, like the character that you press on the keyboard.

277
00:21:10,300 --> 00:21:15,970
It also has a numerical value assigned to it in hex and a numerical value assigned to it in decimal.

278
00:21:16,000 --> 00:21:18,430
Those things can all be translated back and forth.

279
00:21:19,060 --> 00:21:22,600
Think about this as like it's looking at that decimal value.

280
00:21:24,790 --> 00:21:31,240
As well, and you notice that we just said that things that are not zero are just evaluated to true

281
00:21:31,240 --> 00:21:34,000
like numbers that are not zero are evaluated true here.

282
00:21:34,870 --> 00:21:39,640
So that's why it still is evaluating whatever is in between the parentheses to true.

283
00:21:39,640 --> 00:21:40,780
And so it's printing this.

284
00:21:41,890 --> 00:21:43,090
So that's something interesting.

285
00:21:43,090 --> 00:21:48,490
I just want to point out before we in the lecture that it's not just limited to only putting the Boolean

286
00:21:48,490 --> 00:21:54,910
variable in here, it's really whatever the C++ language considers true or false in between these.

287
00:21:55,900 --> 00:22:01,840
Parentheses, it's going to use that to evaluate it as to whether it should run the code in here.

288
00:22:03,510 --> 00:22:05,140
OK, so I think that's enough.

289
00:22:05,170 --> 00:22:07,740
I'm going to go ahead and end on that next.

290
00:22:07,980 --> 00:22:14,290
In either the next lecture or a subsequent lecture, we will get into the arithmetic operators, but

291
00:22:14,560 --> 00:22:18,680
go ahead and practice this as much as you can to get comfortable with it.

292
00:22:18,700 --> 00:22:21,790
And with that, I will see you in the next lecture.
