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

af Afrikaans
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bn Bengali
bs Bosnian
bg Bulgarian
ca Catalan
ceb Cebuano
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
tl Filipino
fi Finnish
fr French
fy Frisian
gl Galician
ka Georgian
de German
el Greek
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian Download
is Icelandic
ig Igbo
id Indonesian
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
km Khmer
ko Korean
ku Kurdish (Kurmanji)
ky Kyrgyz
lo Lao
la Latin
lv Latvian
lt Lithuanian
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mn Mongolian
my Myanmar (Burmese)
ne Nepali
no Norwegian
ps Pashto
fa Persian
pl Polish
pt Portuguese
pa Punjabi
ro Romanian
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
st Sesotho
sn Shona
sd Sindhi
si Sinhala
sk Slovak
sl Slovenian
so Somali
es Spanish
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
te Telugu
th Thai
tr Turkish
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
or Odia (Oriya)
rw Kinyarwanda
tk Turkmen
tt Tatar
ug Uyghur
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:00,450 --> 00:00:01,860 All right, welcome back. 2 00:00:01,890 --> 00:00:05,350 So now let's start solving this exercise together. 3 00:00:05,370 --> 00:00:11,010 So for that, let's first of all, create a new variable and call it tator seconds. 4 00:00:11,670 --> 00:00:16,740 And the total seconds should represent simply the value that we will read from the user. 5 00:00:16,810 --> 00:00:18,900 OK, right afterwords. 6 00:00:18,900 --> 00:00:24,660 We will also create hours, additional variable, additional variable minutes. 7 00:00:24,900 --> 00:00:29,090 And let's call the last variable remaining seconds. 8 00:00:29,700 --> 00:00:37,080 OK, so total seconds, which will read from the user hours, minutes and remaining seconds. 9 00:00:38,010 --> 00:00:41,870 Now let's just read the values from the user. 10 00:00:41,890 --> 00:00:47,340 So print f enter total seconds that you want to convert, right. 11 00:00:47,340 --> 00:00:56,970 That you want to convert, that you want to convert and the user is going to insert his or hers total 12 00:00:56,970 --> 00:01:01,140 seconds when we are going to read it using this kind of function. 13 00:01:01,170 --> 00:01:07,020 So we are going to read it using the percentage, the placeholder since we are working with an integer 14 00:01:07,350 --> 00:01:09,420 in stories inside the address. 15 00:01:09,420 --> 00:01:09,840 Right. 16 00:01:09,870 --> 00:01:15,520 This percent represents the address of the variable total seconds. 17 00:01:16,680 --> 00:01:17,170 OK. 18 00:01:17,190 --> 00:01:20,160 So basically we've got it covered. 19 00:01:20,220 --> 00:01:29,160 Now, what we have to do is to start the main operation of calculating, of calculating the total amount 20 00:01:29,160 --> 00:01:36,960 of hours, total minutes and the remaining seconds that these value we received here may represent, 21 00:01:37,020 --> 00:01:39,510 just like we've seen in the example before. 22 00:01:40,320 --> 00:01:48,270 And for that to do so, we know that the full time, if we have seconds and we want to represent or 23 00:01:48,270 --> 00:01:56,520 just to take the full part to the full hours from this given number, we know that in one hour you have 24 00:01:56,520 --> 00:01:58,920 60 Minutes and 60 Minutes. 25 00:01:58,920 --> 00:02:01,120 Each minute has 60 seconds. 26 00:02:01,440 --> 00:02:09,370 So 60 multiplied by 60 is a total of three thousand and six hundred or thirty six hundred. 27 00:02:10,500 --> 00:02:17,040 So if we want to get the worst part was simply right, hours equals two total seconds. 28 00:02:17,070 --> 00:02:21,150 OK, and we've tried to divide it by three thousand six hundred. 29 00:02:21,960 --> 00:02:28,560 And whatever the result will be here one hour to hour, three hours or zero hours, that's the total 30 00:02:28,560 --> 00:02:33,360 amount of hours, the full hours that we can put inside of the total seconds. 31 00:02:33,390 --> 00:02:37,760 OK, so how many times basically will we presented? 32 00:02:38,100 --> 00:02:43,560 We can put three thirty six hundred into the total seconds. 33 00:02:43,560 --> 00:02:44,690 That's the result. 34 00:02:44,730 --> 00:02:46,720 The hours will represent here. 35 00:02:46,740 --> 00:02:49,400 OK, so that's about the hours. 36 00:02:50,250 --> 00:02:56,670 And let's also talk about the minutes or so minutes equals and what will the minutes should be equal 37 00:02:56,670 --> 00:02:56,920 to. 38 00:02:57,180 --> 00:03:01,400 So we should simply remove the previous hours. 39 00:03:01,450 --> 00:03:05,710 OK, all the seconds that the full hour is consumed. 40 00:03:05,730 --> 00:03:14,880 So that will be something like this that seconds minus hours multiplied by thirty, thirty six hundred. 41 00:03:15,100 --> 00:03:21,650 OK, guys, so that's a value in this parenthesis simply represents the remainder. 42 00:03:21,690 --> 00:03:28,410 OK, in terms of what how many seconds are still part of these total seconds. 43 00:03:28,440 --> 00:03:36,990 So if we had something like this for a thousand and we know that we may put three thirty six hundred 44 00:03:36,990 --> 00:03:41,970 just once in these four thousand, then the remainder will be simply 400. 45 00:03:41,970 --> 00:03:43,500 OK, 400 seconds. 46 00:03:43,980 --> 00:03:46,200 And we think these 400 seconds. 47 00:03:46,200 --> 00:03:54,210 And we know that if we want to represent these 400 seconds in terms of minutes, we should simply divided 48 00:03:54,210 --> 00:03:59,640 by 60, since we know that there are 60 seconds in a minute. 49 00:04:00,480 --> 00:04:03,540 And that's basically how you find the minutes. 50 00:04:04,200 --> 00:04:09,980 Finally, what we have to do is to leave the remaining seconds and to calculate it. 51 00:04:09,990 --> 00:04:14,940 So it will be the total seconds, minus minus what? 52 00:04:15,270 --> 00:04:19,410 Minus hours multiplied by three. 53 00:04:19,470 --> 00:04:20,710 Sixteen, right. 54 00:04:21,330 --> 00:04:22,630 Thirty six hundred. 55 00:04:22,650 --> 00:04:23,560 I'm sorry for that. 56 00:04:23,820 --> 00:04:27,590 That's a lot of videos I've recorded today, so I'm a little bit tired. 57 00:04:27,840 --> 00:04:31,950 So total seconds, minus hours multiplied by thirty six hundred. 58 00:04:32,310 --> 00:04:39,710 And instead of just dividing it by 60 like we've done it here, we will simply calculate the remainder 59 00:04:39,810 --> 00:04:42,770 if we would have divided it by 60. 60 00:04:43,020 --> 00:04:49,010 So the full part will go to the minutes and the remainder will go to the seconds. 61 00:04:49,890 --> 00:04:51,340 That's how we calculated. 62 00:04:52,000 --> 00:04:59,820 So lastly, all that remains for us to do is to print out total hours for. 63 00:04:59,970 --> 00:05:04,260 Then tragedy, that's your next Leshan hours and the same. 64 00:05:04,290 --> 00:05:12,780 We are going to do four minutes and seconds, OK, so that's going to be ten minutes and the remaining 65 00:05:12,930 --> 00:05:15,360 remaining seconds. 66 00:05:16,260 --> 00:05:17,760 So I hope that's clear, guys. 67 00:05:18,270 --> 00:05:20,850 And basically, let's build and run it. 68 00:05:20,850 --> 00:05:22,770 And hopefully this will work. 69 00:05:23,160 --> 00:05:33,120 So hours I know it was four thousand one hour, six total hours, total minutes. 70 00:05:33,600 --> 00:05:35,760 So 10 minutes and total. 71 00:05:35,760 --> 00:05:37,530 What is it total. 72 00:05:37,530 --> 00:05:45,300 A total remaining remaining seconds. 73 00:05:45,420 --> 00:05:46,890 So let's build and run it. 74 00:05:47,130 --> 00:05:52,860 So for a thousand seconds is just one hour, six minutes and 40 seconds. 75 00:05:53,130 --> 00:06:03,350 And if we had I don't know, let's say 8000 or 8500, then it's two hours, 21 minutes and 40 seconds. 76 00:06:03,900 --> 00:06:05,610 So I hope that's clear to you guys. 77 00:06:05,790 --> 00:06:10,200 I really hope you like the video so far and the explanations. 78 00:06:10,560 --> 00:06:12,870 And until next time, I'll see you then. 7425

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