Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,570 --> 00:00:01,870
What is going on, guys?
2
00:00:01,920 --> 00:00:08,030
My name is Vlad, this is Alphatech, and that's another exercise in our programming course.
3
00:00:08,940 --> 00:00:16,590
And in this video, what we have to do is to write a program that receives an integer representing seconds.
4
00:00:16,620 --> 00:00:25,110
OK, so just the program using some probably input command or input function that the value that we
5
00:00:25,110 --> 00:00:28,190
are going to receive is simply some seconds.
6
00:00:28,920 --> 00:00:38,340
And right after we received this value, the program should convert the given seconds into total hours,
7
00:00:38,490 --> 00:00:42,040
total minutes and remaining seconds.
8
00:00:42,510 --> 00:00:49,710
So if we want to take a look at some nice example, let's say we have four thousand seconds as an input,
9
00:00:50,160 --> 00:00:57,350
then we want to break it down to how many hours, how many minutes and how many seconds we have.
10
00:00:57,430 --> 00:01:03,830
Still, we still have in this kind of all seconds represented.
11
00:01:03,840 --> 00:01:07,030
So we know that we have one full hour.
12
00:01:07,050 --> 00:01:13,230
So let me use here the laser pointer, one full hour, which is a total of three thousand six hundred
13
00:01:13,230 --> 00:01:13,780
seconds.
14
00:01:14,130 --> 00:01:21,630
We also know that the remaining minutes will be four thousand minus three thousand, then six hundred,
15
00:01:21,930 --> 00:01:25,200
which is a total of four hundredths seconds.
16
00:01:25,210 --> 00:01:33,300
And if we want to calculate the minutes, we will simply divide the seconds that are left by 60 and
17
00:01:33,300 --> 00:01:37,710
we will get probably six minutes total six minutes.
18
00:01:37,710 --> 00:01:42,830
Right, because we just take the full part of our the full part of minutes.
19
00:01:43,290 --> 00:01:50,790
And also, if we want to know what are the remaining seconds, we simply take 400, which we had here
20
00:01:50,790 --> 00:01:56,940
and are divided using the remainder operator and find that we have 40 seconds.
21
00:01:57,280 --> 00:02:07,650
So if we have these various inputs for a thousand seconds and we want to represent it in terms of hours,
22
00:02:07,650 --> 00:02:09,060
minutes and seconds.
23
00:02:09,420 --> 00:02:17,340
So we have these are one hour, six seconds and forty six minutes and 40 seconds, which is the total
24
00:02:17,340 --> 00:02:20,460
representation of these four thousand seconds.
25
00:02:20,830 --> 00:02:27,930
So simply getting a seconds as an input or converting it into hours, four hours, four minutes and
26
00:02:27,930 --> 00:02:29,370
the remaining seconds.
27
00:02:29,400 --> 00:02:36,130
OK, just a couple of mathematical operations that we are going to do in order to complete it.
28
00:02:36,600 --> 00:02:43,170
So take a couple of minutes, write this programming your programming language and using your I.D. and
29
00:02:43,200 --> 00:02:45,120
I will see you in the Solutions video.
3187
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.