All language subtitles for 6. Control Flow - Relational Operators

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
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
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian Download
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

Hi there, guys.

In this video, we are going to talk about relational operators.

Well, the name itself is kind of scary, but there is no need for panic just yet.

Relational operators are used in conditions and they simply tell you how you are going to ask a certain

question.

For example, how you are going to ask if a grade is higher than 80.

In our programming language and actually we've seen a couple of examples in the previous videos where

we use these relational operators probably without even noticing that.

And to tell you the truth, guys, you as a future programmer, you must be familiar with all of these

terms that we've used so far and all of the terms that we are going to use in these course.

And that's why in this video, we are going to talk about it in more detail and use a little bit of

more formality.

So we talked about different rules that should be followed in every programming language.

You do remember that, right?

So the same goes here.

There are things and rules that should be applied when constructing conditions.

Now you sing.

I sing most of the programming languages when you would like to ask a question.

It won't be simply enough to ask for it in English.

Something like if grade is greater than 80.

So we are interested in constructing the conditions in our programming language, just like we've seen

in previous examples.

And that's exactly the place and the time when we would like to use relational operators that will help

us with this task.

So relational operators are just these signs, which you've probably seen most of them somewhere before,

maybe even on your math classes.

And the first one, the greater them, helps in constructing a condition to check if the left side is

greater than the right side.

Then we have the greater than or equals two, which is pretty much the same.

It simply checks if the left side is greater than the right side or if the left side equals to the right

side.

So if either of these options happens to be true, then the result of the condition will be true.

So in most cases, if we would like to ask a question like if grade is greater than 80, we are probably

going to do it in this way.

We are going to use of the greater than relational operator assign and simply put, the grade, which

is a variable on its left and the value of eighty on its right.

And if this condition happens to be true, meaning that grade is actually is greater than 80, we are

going to execute some of their following commands that we would like to execute.

And the same goes for the less then and the less then or equals to science.

They are pretty much the same as we use the greater than the last.

Then checks of the value on its left is less than the value on its right.

And if that's the case, the result of the condition is going to be true.

We also may have times when we would like to check if the user has done a great job on his last exam.

So probably we are going to check if the grade was, for example, let's say a hundred.

So for that, we are going to use the equals to sign.

Please note that there are two of these signs right here.

And one, they are used this way when they come in despair.

They check the equality between what is on its left side to what is on its right side.

Otherwise, if you wouldn't have used just one of them, then you know that it won't be used to check

any condition, but rather it would simply be an assignment operation like we've seen Prieur in the

previous videos and in the previous section.

So that's an important note, guys.

Please make sure you do not mess around with this.

And here is an example of how to use the equals to logical operator check.

So you use if grade.

Then use the equals to sign.

And you use 80 or a hundred to just check that.

You did grade on your last exam.

And lastly, we also have the not equals to sign this operator as simply means that if we have it as

part of our condition and the value on its left does not equals to the value on its right, then the

result of the condition is going to be true.

The same as equals to just the opposite.

And if you would like to write a condition to make sure that you didn't run out of cash.

Meaning that we don't have a zero to our account.

You should use the.

That equals sign just like this.

And let's hope that these conditions shall always remain true.

Definitely not less then.

Don't let it be less than zero.

That's a problem.

All right.

So this is it for this video.

Now we know water relational operator, seeing how they can be used and now we are ready to move on

to our challenges.

So I'll see you there, guys.

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