All language subtitles for 019 Exercise Six (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

Welcome to exercise number six.

In this exercise, the output we're expecting is a right diagonal and hopefully our code can print something

remotely similar.

And you know what, that's not a bad start, at least compared to the last one, we have something to

work with, but like always, let's put some break points and visualize the run time.

Hopefully we can identify the first bug.

OK, so I as one is also one Apprentice star.

And there's the first bug, the first line prints many spaces with a start at the end, the second line

prints one less that amount a third line prints one, lets that amount onto the last line, prints only

the star.

And going back to our code, the amount of times the inner loop runs goes up with the outer loop counter.

Instead, it needs to go down with the outer loop counter.

So I should start by equaling five.

And the outer loop is going to keep running as long as I is bigger than or equal to one.

And we're going to decrease the counter after every run.

OK, relaunching the debugger.

I starts at five.

So the inner loop runs five times.

Until Jay exceeds five, breaking the inner loop prints a new line and the second pass equals four,

so the inner loop is going to run four times and this is perfect.

We're making progress.

OK.

Now, the next thing we want to do is only print the final star.

And how are we going to do that?

Let's find out, relaunched the debugger.

First pass equals five JS one, we don't want to print anything here.

Nothing here, nothing here.

We only want to print the star at the very last run one J equals a five.

Second pass equals four, once again, we don't want to print any stars, not until J.

Equals IV for.

So when Jay is less than I, we want to print two empty spaces.

Otherwise, we want to print the star.

All right, last time.

First, past equals five days less than that, so it going to print the white space.

And it's going to keep printing white space until I equals Jay.

Second pass equals four J once again is less than ISO, it's going to print space.

Until Jake equals eye for.

Third pass equals three white space, white space, and where J equals three, it prints a star.

And just like that, we debugged our code.

And it should print a nice right diagonal perfect.

Now you can feel free to run the code to your heart's content.

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