Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
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.