All language subtitles for 120 Life in Weeks Solution.en_US

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

So this was a relatively simple exercise but I'm going to quickly go through the solution in case you

got stuck and you wanted to see how it's done.

So the goal is very simple.

We want to be able to output this exact sentence replacing the X Y and Z with the actual number of days

weeks and months.

We have left.

If we live until ninety two in this case our age is going to be passed in as an input to this function

life in weeks and we're going to be able to use it to do all of these calculations.

So here it tells us that we're assuming there's 365 days in a year 52 weeks in a year and 12 months

in a year.

So we can use this information to calculate the days weeks and months remaining.

So let's go ahead and do that.

We're saying that we're assuming that we'll live until 90.

So let's create a variable called years remaining that's going to be set to 90 minus age.

Now once we've got the years remaining then we can work out the number of days weeks a month left.

So days equals years remaining multiplied by 365 weeks equals years remaining multiplied by 52.

And finally months equals years remaining multiplied by 12.

So now that we've got all of our numbers days weeks and months and make sure that we haven't made any

typos anywhere then we're ready to go ahead and console log the output.

So I'm going to go ahead and type out this message trying to make sure that I don't make any typos and

have the same capitalization.

So you have X days y weeks and Z months left full stop.

So this is what I'm going to try and output and I'm going to replace each of these with the actual calculated

values.

So I'm going to delete the X at some double quotes and then use some plus signs so that I can actually

concatenate the actual value of days and then I'm just gonna do this for the other parts

so now that I think I've completed my code I'm going to click on this link to go to my Rapley playground

and I'm going to paste my code inside this function.

So now we can go ahead and call this function life in weeks and pass in our actual age.

Let's say I am 12 and then we can click on run to see if it actually works.

So if I was 12 years old 90 minus 12 is going to be equal to 78.

So the days remaining will be 78 multiplied by three six five which is twenty eight thousand four hundred

and seventy.

The weeks remaining will be 78 multiplied by 52 which is four thousand fifty six.

And finally the month remaining will be 78 multiplied by twelve.

And that's nine hundred and thirty six months.

So now that I've assured myself that my functions working I can go back and go ahead and click on check

solution and hopefully as long as my sentence matches the exact example output including all the spaces

and the capitalizations and all of the commas and full stops then my solution should pass and I should

have completed this challenge.

So how did you get on if you got stuck go back to it and try to fix it so that it works.

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