All language subtitles for 11. Looping

af Afrikaans
ak Akan
sq Albanian
am Amharic
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
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) Download
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

Now moving on to looping.

So we introduce looping in our bash scripting video and we took the for loops and we made one line for

loops and those should be familiar to you.

So for loop is just a start to finish of an inter it right.

We wanted to run that pinging scanner for example and we started at the one and we ended at 256 on our

IP suite.

Now we're going to introduce that in Python form.

And we're also going to introduce a while loop.

Now the while loop is going to come back into play later on in this course especially when we get into

the exploit development part of the course.

So a while loop just think of it that it executes as long as something is true.

So let's make a new section here we're going to do a new line as usual and we're just going to go ahead

to say something like looping and let's go ahead and start with for loops.

So we'll do four loops and note that this is just the start to finish of and iterate.

OK so let's say for example that we have a list.

OK.

Let's go back to lists and we'll say vegetables and let's just throw some vegetables in there.

You can pick whatever you want.

I'm going to do a cucumber.

I'm going to do spinach and how about cabbage cake.

And again your list can look however you want to look now for this for loop.

We're going to say for X..

And remember same thing with bash.

X can be whatever you want to call it.

You can call this for veggies call whatever you want.

I just like to use a letter because it's simple to type out.

We're going to say for x in vegetables we're just going to print x and what do we think this is going

to do.

This is going to go through this list right.

It says Save for every item in vegetables.

I want you to print that out.

So we're gonna grab cucumber we're gonna grab spinach we're gonna grab cabbage print print print.

So let's take a look at that.

Let's go ahead and save it.

We're on our script here.

You can see that it printed cucumbers spinach and cabbage.

So again you've seen this before.

Just a classic example of for.

As long as we have something to iterate through we're iterating through a list here.

And remember before again we were like sequins one through two fifty five.

We iterated through that to do our pink sweep.

So we're just iterating through something that's it really basic.

Now we also have wall loops so we'll say while loops and these execute as long as true.

So later on you're going to see something that says while True the capital while true we're going to

do something.

Don't worry about that right now.

For this example we're gonna do is we're going to say i equals 1 k and so he said there will I.

That's equal to 1.

Now let's do a while loop we're going to say Well I as less than 10 I want you to go ahead and print

out I.

And then we're going to iterate I plus equals 1.

So this should all start tying together from what you saw earlier.

Remember that we had the plus equals and we're adding one to something.

So what we're doing here is you're saying hey I equals 1.

And you know it while i is less than 10 I want you to go ahead and print out.

I then we're going to say hey I is plus equals 1.

So that means I'm now going to be two then we're gonna go back through this loop again.

Now while 2 is less than 10.

Go ahead and print out that it's to make it three 3s less than 10 over and over and over and over until

this condition is no longer true.

The second that this eye becomes 10 this loop is not no longer true and it's going to stop.

So we're gonna go ahead and save this here.

Let's go ahead and print this out and you can see that we just printed 1 3 9 as expected so you're gonna

get to see these again you're going to get examples of them again.

As of right now I just want you to understand that a for loop isn't inner it and a wall loop executes

as long as true.

OK so don't worry about how they're used quite yet just understand what they are what they mean and

then you're going to see them come up and practical examples later on it'll make a lot more sense as

we go through it.

So we're going to move on to the next video.

I'm going to go ahead and catch you over there.

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