All language subtitles for 6. Boolean Expressions

af Afrikaans
sq Albanian
am Amharic
ar Arabic Download
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bn Bengali
bs Bosnian
bg Bulgarian
ca Catalan
ceb Cebuano
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
tl Filipino
fi Finnish
fr French
fy Frisian
gl Galician
ka Georgian
de German
el Greek
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
km Khmer
ko Korean
ku Kurdish (Kurmanji)
ky Kyrgyz
lo Lao
la Latin
lv Latvian
lt Lithuanian
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mn Mongolian
my Myanmar (Burmese)
ne Nepali
no Norwegian
ps Pashto
fa Persian
pl Polish
pt Portuguese
pa Punjabi
ro Romanian
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
st Sesotho
sn Shona
sd Sindhi
si Sinhala
sk Slovak
sl Slovenian
so Somali
es Spanish
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
te Telugu
th Thai
tr Turkish
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
or Odia (Oriya)
rw Kinyarwanda
tk Turkmen
tt Tatar
ug Uyghur
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:00,180 --> 00:00:01,080 Welcome back. 2 00:00:01,080 --> 00:00:06,720 So now we're going to discuss what are called boolean expressions. 3 00:00:06,720 --> 00:00:12,730 And we can go ahead and just type this right into our text file if you don't have your file open with 4 00:00:12,760 --> 00:00:13,170 GZA. 5 00:00:13,170 --> 00:00:21,030 Go ahead and get your script up high open and we're gonna do is we're going to just put in here boolean 6 00:00:21,060 --> 00:00:21,970 expressions. 7 00:00:22,650 --> 00:00:29,370 And now when we say boolean expressions we can just think of this as true or false. 8 00:00:30,690 --> 00:00:38,010 So let's go ahead and print our new subject line or to in a call these boolean expressions. 9 00:00:38,970 --> 00:00:47,080 And from here let's start defining those so let's say we have boolean expression one we'll just call 10 00:00:47,080 --> 00:00:49,620 the variable bool one. 11 00:00:49,620 --> 00:00:52,480 Now let's just set that equal to true. 12 00:00:53,590 --> 00:00:54,030 OK. 13 00:00:54,730 --> 00:00:57,280 And let's give an example of that as well. 14 00:00:57,280 --> 00:01:05,930 Let's just say boolean to equals let's say three times three now. 15 00:01:05,960 --> 00:01:07,730 What does three times three equals. 16 00:01:07,730 --> 00:01:08,840 Well that equals nine. 17 00:01:09,140 --> 00:01:14,270 So we can say equals equals to mean something equals something. 18 00:01:14,270 --> 00:01:16,790 And so this number equals this number. 19 00:01:16,790 --> 00:01:19,360 So three times three is nine which equals nine. 20 00:01:19,370 --> 00:01:28,670 So if we take this expression and we say nine equals nine it's going to return true. 21 00:01:28,670 --> 00:01:29,690 Let's do a couple more. 22 00:01:29,750 --> 00:01:39,570 So we could say a billion three equals false and billion four equals three times three. 23 00:01:39,570 --> 00:01:43,500 And then we can say does not equal nine. 24 00:01:44,370 --> 00:01:45,500 Well that's not true. 25 00:01:45,510 --> 00:01:45,870 Right. 26 00:01:45,900 --> 00:01:47,730 So that's false. 27 00:01:47,760 --> 00:01:59,970 So if we were to print these all out we could say print billion one billion to both three and bull for. 28 00:02:00,190 --> 00:02:00,850 OK. 29 00:02:00,850 --> 00:02:02,620 And let's also print the type. 30 00:02:02,650 --> 00:02:04,070 So we know about this. 31 00:02:04,490 --> 00:02:05,730 So there's a print type. 32 00:02:05,950 --> 00:02:13,370 And let's take a look at what this looks like so once you have that all written out go ahead and just 33 00:02:13,370 --> 00:02:23,910 save this and go ahead and run your file and you can see that it came out exactly how we thought it 34 00:02:23,910 --> 00:02:25,410 would. 35 00:02:25,410 --> 00:02:30,390 So we've got four variables and they're all boolean expressions right. 36 00:02:30,420 --> 00:02:34,140 So we've got true this equals to true. 37 00:02:34,140 --> 00:02:35,370 This is false. 38 00:02:35,730 --> 00:02:38,240 And this is equal to False. 39 00:02:38,310 --> 00:02:40,380 So we see a true true false false. 40 00:02:40,380 --> 00:02:46,290 We print those all out and then when we want to look at the type of the variable so we say hey what's 41 00:02:46,290 --> 00:02:50,640 stored in here inside this variable what's stored is a boolean. 42 00:02:50,640 --> 00:02:57,180 Now please do note that there is a difference between true and true. 43 00:02:57,180 --> 00:02:59,400 One is a string and one is a boolean. 44 00:02:59,760 --> 00:03:10,320 So if you were to set boolean Phi for example to true and then you printed the type of boolean five 45 00:03:11,310 --> 00:03:15,280 then you're going to get a different result here. 46 00:03:15,660 --> 00:03:19,860 You're going to see now that the type is a class of string. 47 00:03:19,860 --> 00:03:24,330 So big difference here I'm going to go ahead and just delete this. 48 00:03:24,360 --> 00:03:28,980 So this is just an overview of boolean expressions. 49 00:03:28,980 --> 00:03:35,730 We're going to use this later on and you will see it again when we get into X flight development. 50 00:03:36,120 --> 00:03:40,860 But you're going to see certain things especially when you get into loops as well. 51 00:03:40,860 --> 00:03:46,270 So once we start getting into looping and we talk about that it will make a little bit more sense. 52 00:03:46,410 --> 00:03:53,640 But you want to know sometimes if something is true or something is false or when we get into conditional 53 00:03:53,640 --> 00:03:59,520 statements if something is true then do this or if something is false do this. 54 00:03:59,520 --> 00:04:03,990 We haven't gotten quite that far yet but we need to introduce the concepts before we can build upon 55 00:04:03,990 --> 00:04:04,170 it. 56 00:04:04,620 --> 00:04:09,150 So we're gonna do in the next video is we're going to build upon these even more. 57 00:04:09,240 --> 00:04:15,780 We're going to take relational operators and these boolean expressions and kind of combine them and 58 00:04:15,780 --> 00:04:16,820 start building upon it. 59 00:04:16,830 --> 00:04:20,430 And then once we get this all put together it'll all start making sense. 60 00:04:20,460 --> 00:04:26,130 So for now all you need to know is when I say bullying expression all I'm thinking about is true or 61 00:04:26,130 --> 00:04:26,700 false. 62 00:04:26,910 --> 00:04:29,040 So we'll build upon that in later videos. 5779

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.