All language subtitles for 017 Exercise Five (Solution)_en

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
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

All right, exercise number five.

If we look at the output, it seems like we want to get some kind of pyramid that skips every second

row and prints the letter that follows.

Let's hope the code that we have print anything remotely similar.

And what the heck is this?

We definitely have our work cut out for us.

OK, where do we start?

You know what?

I have no idea.

So I'm going to do is just place a bunch of break points and just try to see why this code is behaving

the way that it is.

OK, so the first part of the outer loop is one, I imagine this two is not zero skipping the statement

and as soon as we enter the inner loop, A gets converted to another letter before it has the chance

to get printed.

That's not right.

If you look at the output, we need to print the letter A..

So what I'm going to do is start by moving this after the print function.

All right, let's try again.

OK, just not smaller than I, so it prints the letter A, OK, and now if I look back at the output,

I need to start a new line, but this inner loop is going to run ten times before the next new line,

which is not what we want to do.

So right there, by visualizing the runtime using breakpoints, I've already identified the second bug.

So once again, the amount of times the inner loop runs depends on the outer loop index, not a static

value of ten.

So we'll change that.

And OK, I think we might be on to something.

Let's run the code.

Hmm, it's skipping a whole lot of letters that can't be good.

Let's relaunch the debugger.

OK, we're fine here.

So at this point, I equals two and it's about to set this run.

Equals three.

Oh, I see every time it prints an empty space, it also increments the letter.

So this line should be in the outer loop, not the inner loop.

All right, restart the debugger.

Prince, the letter A.

Skips the next one.

And that's all.

Good job on debugging, exercise number five.

This was definitely not an easy one to debug, but we made it.

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