All language subtitles for 9. Python structures IF ELIF ELSE

af Afrikaans
sq Albanian
am Amharic
ar Arabic
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 Download
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:10,970 --> 00:00:17,750 A1 and welcome in this new video in this video, we're going to talk about conditioner structure and 2 00:00:18,020 --> 00:00:21,320 more precisely that if conditioner structure. 3 00:00:23,240 --> 00:00:32,990 So it is a very simple structure because it's work like that, you are going to set a condition, a 4 00:00:33,000 --> 00:00:34,400 logical operation. 5 00:00:34,610 --> 00:00:43,520 And if this logical operation is true, then you will earn a piece of code. 6 00:00:43,970 --> 00:00:50,570 For example, if the market is open, then I will learn my algorithm. 7 00:00:52,730 --> 00:00:57,010 So it is very easy to create if structure. 8 00:00:57,020 --> 00:00:58,010 So let me show you. 9 00:00:58,820 --> 00:01:08,540 So you need to put the if operator then you logical operation that you want to test. 10 00:01:09,080 --> 00:01:22,070 So five is lower than six, for example, then you need to put at double points to tell to Python that. 11 00:01:23,090 --> 00:01:29,540 This is your logical oppression, and this is you, if true to you after this double point. 12 00:01:30,140 --> 00:01:31,610 You keep a line. 13 00:01:31,910 --> 00:01:36,710 And as you can see, there is a little space. 14 00:01:37,310 --> 00:01:48,680 This space is named in the tension and this indentation 10 to python that also could weave the indentation 15 00:01:48,680 --> 00:01:53,990 here is in the conditional structure. 16 00:01:54,020 --> 00:02:05,170 If so, for example, if I put yes and I ruined, the five is lower than six. 17 00:02:05,240 --> 00:02:07,760 So by then we'll print. 18 00:02:07,880 --> 00:02:11,540 Yes, but if I change this test, for example, 19 00:02:14,840 --> 00:02:19,160 this is natron because this test is false. 20 00:02:20,420 --> 00:02:25,970 So it is the most easiest way to create a if structure. 21 00:02:26,690 --> 00:02:34,130 But sometimes it, for example, here you want to know if this test is not true. 22 00:02:34,490 --> 00:02:44,030 So to do it, you need to add another factor in your conditional structure to create a conditional structure. 23 00:02:44,150 --> 00:02:50,420 If it's so if this look logical, operation is true, you run. 24 00:02:53,720 --> 00:03:07,910 But otherwise, if you want to print something, you need to put the SCOPERTO the operator as no need 25 00:03:08,060 --> 00:03:08,630 to. 26 00:03:08,630 --> 00:03:10,390 Logical operation. 27 00:03:10,730 --> 00:03:11,150 Why? 28 00:03:12,230 --> 00:03:25,010 Because if this logical operation is false in all the other keys you were in there in the structure. 29 00:03:25,730 --> 00:03:26,060 So. 30 00:03:32,110 --> 00:03:44,860 If the logical operation is false, I want to print a note to tell that this logical operation is not 31 00:03:45,100 --> 00:03:45,430 true. 32 00:03:47,140 --> 00:03:57,160 Then we are going to see the condition and structure, if any, as this condition or structure is the 33 00:03:57,160 --> 00:04:07,540 most complex structure with the if conditional structure, it will allow us to have moral condition 34 00:04:07,540 --> 00:04:09,760 to verify, for example. 35 00:04:09,770 --> 00:04:20,630 So I put that variable and then I will create more than one condition using that. 36 00:04:20,650 --> 00:04:22,420 And if both after so. 37 00:04:25,950 --> 00:04:30,510 I put my first condition, so as we have seen before. 38 00:04:35,870 --> 00:04:42,800 So if X is greater or equal to 15, I will just print it. 39 00:04:45,470 --> 00:05:00,020 But, for example, we can say that in all of the awful case, I want to say that X is lower than 15. 40 00:05:00,470 --> 00:05:06,140 But sometimes we need to add another condition and to do it. 41 00:05:07,820 --> 00:05:09,920 We use the and operator. 42 00:05:10,280 --> 00:05:21,110 It means that if this condition is not verified before to when this good, we need to verify another 43 00:05:21,110 --> 00:05:21,770 condition. 44 00:05:21,990 --> 00:05:23,120 So for example, 45 00:05:27,020 --> 00:05:29,360 now we are going to verify if 46 00:05:33,350 --> 00:05:36,320 X is greater than that. 47 00:05:36,800 --> 00:05:53,420 But it is really important to understand that this could eat e-tron's only if this condition are not 48 00:05:53,420 --> 00:05:53,960 verified. 49 00:05:54,590 --> 00:05:58,220 So it means that if. 50 00:06:00,000 --> 00:06:14,370 Python, read this line INXS is lower than 15, and then we want to know if it is between 10 and 15. 51 00:06:14,740 --> 00:06:16,500 Oh, if it is. 52 00:06:19,990 --> 00:06:23,290 Lower or equal to 15, a 210, sorry. 53 00:06:26,780 --> 00:06:34,700 So we are going to change the value of the X to see if our is correct. 54 00:06:43,370 --> 00:06:49,010 So as we can see, we have correctly implement the conditional structure. 55 00:06:49,070 --> 00:06:58,700 If it fails, I would invite you to play you with this because the if structure is very essential when 56 00:06:58,700 --> 00:07:00,410 you walk on your own project. 5262

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