All language subtitles for 022 Exercise Seven (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
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
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:00,420 --> 00:00:06,030 All right, it's time to have some fun with some arrays so we have a 2D array of zeros or a matrix of 2 00:00:06,030 --> 00:00:06,930 zeros, if you will. 3 00:00:07,400 --> 00:00:09,600 And we want each column to count up a number. 4 00:00:09,720 --> 00:00:12,660 So zero zero zero one one one two two two. 5 00:00:16,280 --> 00:00:20,390 Since this is a debugging exercise, I'm assuming there's something wrong with the code, so let's run 6 00:00:20,390 --> 00:00:21,350 it and see what's wrong. 7 00:00:30,060 --> 00:00:35,790 And it crashes all right now, as always, line by line, we're going to figure out what's causing the 8 00:00:35,790 --> 00:00:39,080 crash as well as the inevitable bugs that come with it. 9 00:01:04,400 --> 00:01:06,080 OK, so I started to zero. 10 00:01:10,100 --> 00:01:13,260 And as the inner loop runs, I increases instead of J. 11 00:01:13,490 --> 00:01:14,700 Well, that's kind of silly. 12 00:01:15,050 --> 00:01:17,840 This is just going to run forever, eventually hitting three. 13 00:01:17,870 --> 00:01:19,850 This array doesn't have an index of three. 14 00:01:19,850 --> 00:01:22,100 So it's Crash's Index at about. 15 00:01:23,700 --> 00:01:24,690 OK, let's fix that. 16 00:01:29,040 --> 00:01:29,670 Run the code. 17 00:01:35,820 --> 00:01:39,870 OK, another crash index, minus one out of bounds, why is that? 18 00:01:43,530 --> 00:01:45,050 OK, I start at zero. 19 00:01:45,100 --> 00:01:46,170 Everything's fine. 20 00:01:48,020 --> 00:01:49,460 But now is negative one. 21 00:01:50,760 --> 00:01:54,660 It doesn't make sense to decrease the counter by one, I don't know why this person would do that. 22 00:01:59,260 --> 00:02:00,130 Let's run the code. 23 00:02:04,830 --> 00:02:05,980 OK, we're close. 24 00:02:06,000 --> 00:02:09,960 Instead of each column counting up a number, each row is counting up a number. 25 00:02:11,910 --> 00:02:13,320 Hmmm, how do we fix that? 26 00:02:15,030 --> 00:02:16,170 Let me trace the runtime. 27 00:02:25,060 --> 00:02:26,050 There should be zero. 28 00:02:28,610 --> 00:02:30,290 All right, I still zero. 29 00:02:34,130 --> 00:02:40,160 And the next zero should go to the index one zero, but instead it's going to go to the index is zero 30 00:02:40,160 --> 00:02:42,500 one because I zero energy is one. 31 00:02:42,740 --> 00:02:44,120 But if we flip them. 32 00:02:46,810 --> 00:02:50,140 Now, the next zero is going to update the index, one zero. 33 00:02:53,800 --> 00:02:55,510 And I believe that should solve everything. 34 00:02:55,990 --> 00:02:57,370 All right, let's rerun the code. 35 00:03:06,460 --> 00:03:08,800 Perfect, every column counts up a number. 2866

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