All language subtitles for 18. Advanced - Odd Digits Sum

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

So let's make this quick exercise together, guys, because previously we know that the previous exercise

when we had to write down a recursive function that gets an integer and returns one, if the sum of

all the digits in the received number is even otherwise, return zero if it's odd.

And basically we are going simply to modify it a little bit.

So return one.

If the sum of all digits in the received number is odd or otherwise return one, which means in the

case that this sum is even OK.

So very minor a change, very minor change.

In this case, it's going to be zero.

In this case it's going to be one.

In this example.

I just want to like to give it briefly for those of you who is who are interested, maybe some of you

got the idea and you don't have to watch these video to her to the fullest or basically not at all.

So.

I'm just going to modify it a little bit to give you this code like crystal clear.

OK, so if anything, less than 10 and basically that's the stopping condition.

And if that's the case, we know that it can be divided by two without the remainder.

OK, so this is an even number, right?

So that means even number.

And for an even number, we are going to return.

What are we going to return?

We are going to return one.

OK.

So in.

Yeah, what if it's an even number we're going to return, we are going to return here zero, so OK,

otherwise return zero.

In case that's an even number.

Awesome.

So if that's an even number, return zero.

And if that's an odd number, that's basically all the number we are going through a third one and the

result so far is going to be calculated on the similar manner.

OK, we are going to ask if An can be divided, basically the rightmost digit, if it's an even digit

and the result so far is one, then in this case what we will have to return.

What do you think?

If the result so far equals to one, then it means that the result so far is order.

Right.

And if the results so far resolved and this number is even then even plus odd is basically odd.

So that's why we have to return one.

And if the result so far was equal to zero, in this case it was even right.

And if it was even then, the result so far is even and we also know that the given value, the rightmost

element of the rightmost digit is also even then in this case even plus even will equal to even.

And that will mean that the return should be once again, zero.

OK, so here it's going to also stay the same.

OK.

The only fact that change is here is not the code itself, but rather just this understanding.

So if results of equals to one, then it means that the result so far was odd.

OK, otherwise it was even.

So that's basically just the way you look at the results so far and you don't have to change also these

returns.

So this exhibition or a demonstration, quick explanation is clear to you guys.

And of course, take your time, try to solve it on your own and we will see each other again on in

or.

Yeah.

In the next video until next time.

My name is Lisas Alphatech.

I'll see you then.

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