Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,330 --> 00:00:06,900
What is going on and welcome back to another exercise, another interesting exercise in our programming
2
00:00:06,900 --> 00:00:07,380
course.
3
00:00:07,830 --> 00:00:14,010
And in this exercise, what we are going to talk about is what is a leap year and how we can write a
4
00:00:14,010 --> 00:00:20,470
program that will check if a given year that we will specify is a leap year or not.
5
00:00:21,390 --> 00:00:27,090
So basically saying let's say that, first of all, we want to talk about what is a leap year.
6
00:00:27,360 --> 00:00:34,290
And John, generally speaking, we know that we have 365 days a year.
7
00:00:34,350 --> 00:00:34,770
Right.
8
00:00:35,340 --> 00:00:43,980
And there are years where when we simply have three hundred and sixty six days, which means we have
9
00:00:43,980 --> 00:00:51,780
one additional day added to the end of the shortest month, which is February, which means that when
10
00:00:51,810 --> 00:00:57,530
usual year goes on, standard years, we have just 28 days on February.
11
00:00:58,380 --> 00:01:02,400
But there are years when we have 29 days.
12
00:01:02,730 --> 00:01:06,300
And it means that in these years they are called leap year.
13
00:01:06,480 --> 00:01:13,460
And during these years we will have 366 days in this year.
14
00:01:13,470 --> 00:01:18,080
So basically that's the difference between a leap year and not to leap year.
15
00:01:18,840 --> 00:01:26,010
And now all we have to do is simply to write a program that will check if a given year is leap or not,
16
00:01:26,010 --> 00:01:27,470
if it's leap year or not.
17
00:01:27,930 --> 00:01:32,610
And basically there are a couple of conditions that should be satisfied.
18
00:01:32,710 --> 00:01:39,450
OK, I will just summarise everything to you right now that basically, if these conditions will be
19
00:01:39,450 --> 00:01:44,160
satisfied, then we can say that a given year is leap year.
20
00:01:44,160 --> 00:01:51,060
And if some of them were one of them is not satisfied, then we can absolutely say that this year is
21
00:01:51,060 --> 00:01:57,990
not a leap year and this year will contain and just three hundred and sixty five days as usual.
22
00:01:58,830 --> 00:02:00,780
So what is the first condition?
23
00:02:01,110 --> 00:02:04,320
Let's say that the first condition is going to be like this.
24
00:02:04,470 --> 00:02:12,260
If the year can be divided by four without a remainder, then it's probably a leap year.
25
00:02:12,280 --> 00:02:18,820
OK, not 100 percent sure, but that's one of the conditions that we are going to use.
26
00:02:18,840 --> 00:02:25,100
So if the year can be divided by four without a remainder, then probably it's OK.
27
00:02:25,290 --> 00:02:33,750
But if the year can also be divided by a hundred without a remainder, then it's not a leap year.
28
00:02:33,780 --> 00:02:42,120
OK, so we have some some sort of combination between different conditions that based on the result
29
00:02:42,120 --> 00:02:46,050
of all of them, we may conclude if a year is leap or not.
30
00:02:46,800 --> 00:02:53,160
OK, so if the year can also be divided by a hundred, then it's not a leap year.
31
00:02:53,160 --> 00:02:58,710
But if this year it can be divided by 400, then it's a leap year.
32
00:02:58,740 --> 00:03:04,610
OK, so I don't know how to put it straight, guys, but basically these are just the conditions for
33
00:03:04,620 --> 00:03:11,310
satisfying, for satisfying of the result of leap year or not leap year.
34
00:03:11,520 --> 00:03:14,430
I think that take a couple of moments to read once again.
35
00:03:14,440 --> 00:03:16,520
OK, just to make sure you understand it.
36
00:03:16,830 --> 00:03:23,730
And I, I think that encoding these things will look much easier for you because we will have a couple
37
00:03:23,730 --> 00:03:30,030
of conditions and it will be like not so variable and it will be like straight to the point and you
38
00:03:30,030 --> 00:03:34,250
will see exactly how to solve this problem with the leap year.
39
00:03:34,260 --> 00:03:36,150
So I'll see you in the Solutions video.
4319
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.