All language subtitles for 11. Convert Seconds into Hours, Minutes, and Seconds - Solution

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
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, welcome back.

So now let's start solving this exercise together.

So for that, let's first of all, create a new variable and call it tator seconds.

And the total seconds should represent simply the value that we will read from the user.

OK, right afterwords.

We will also create hours, additional variable, additional variable minutes.

And let's call the last variable remaining seconds.

OK, so total seconds, which will read from the user hours, minutes and remaining seconds.

Now let's just read the values from the user.

So print f enter total seconds that you want to convert, right.

That you want to convert, that you want to convert and the user is going to insert his or hers total

seconds when we are going to read it using this kind of function.

So we are going to read it using the percentage, the placeholder since we are working with an integer

in stories inside the address.

Right.

This percent represents the address of the variable total seconds.

OK.

So basically we've got it covered.

Now, what we have to do is to start the main operation of calculating, of calculating the total amount

of hours, total minutes and the remaining seconds that these value we received here may represent,

just like we've seen in the example before.

And for that to do so, we know that the full time, if we have seconds and we want to represent or

just to take the full part to the full hours from this given number, we know that in one hour you have

60 Minutes and 60 Minutes.

Each minute has 60 seconds.

So 60 multiplied by 60 is a total of three thousand and six hundred or thirty six hundred.

So if we want to get the worst part was simply right, hours equals two total seconds.

OK, and we've tried to divide it by three thousand six hundred.

And whatever the result will be here one hour to hour, three hours or zero hours, that's the total

amount of hours, the full hours that we can put inside of the total seconds.

OK, so how many times basically will we presented?

We can put three thirty six hundred into the total seconds.

That's the result.

The hours will represent here.

OK, so that's about the hours.

And let's also talk about the minutes or so minutes equals and what will the minutes should be equal

to.

So we should simply remove the previous hours.

OK, all the seconds that the full hour is consumed.

So that will be something like this that seconds minus hours multiplied by thirty, thirty six hundred.

OK, guys, so that's a value in this parenthesis simply represents the remainder.

OK, in terms of what how many seconds are still part of these total seconds.

So if we had something like this for a thousand and we know that we may put three thirty six hundred

just once in these four thousand, then the remainder will be simply 400.

OK, 400 seconds.

And we think these 400 seconds.

And we know that if we want to represent these 400 seconds in terms of minutes, we should simply divided

by 60, since we know that there are 60 seconds in a minute.

And that's basically how you find the minutes.

Finally, what we have to do is to leave the remaining seconds and to calculate it.

So it will be the total seconds, minus minus what?

Minus hours multiplied by three.

Sixteen, right.

Thirty six hundred.

I'm sorry for that.

That's a lot of videos I've recorded today, so I'm a little bit tired.

So total seconds, minus hours multiplied by thirty six hundred.

And instead of just dividing it by 60 like we've done it here, we will simply calculate the remainder

if we would have divided it by 60.

So the full part will go to the minutes and the remainder will go to the seconds.

That's how we calculated.

So lastly, all that remains for us to do is to print out total hours for.

Then tragedy, that's your next Leshan hours and the same.

We are going to do four minutes and seconds, OK, so that's going to be ten minutes and the remaining

remaining seconds.

So I hope that's clear, guys.

And basically, let's build and run it.

And hopefully this will work.

So hours I know it was four thousand one hour, six total hours, total minutes.

So 10 minutes and total.

What is it total.

A total remaining remaining seconds.

So let's build and run it.

So for a thousand seconds is just one hour, six minutes and 40 seconds.

And if we had I don't know, let's say 8000 or 8500, then it's two hours, 21 minutes and 40 seconds.

So I hope that's clear to you guys.

I really hope you like the video so far and the explanations.

And until next time, 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.