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
Greek
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
What is going on and welcome back to another exercise, another interesting exercise in our programming
course.
And in this exercise, what we are going to talk about is what is a leap year and how we can write a
program that will check if a given year that we will specify is a leap year or not.
So basically saying let's say that, first of all, we want to talk about what is a leap year.
And John, generally speaking, we know that we have 365 days a year.
Right.
And there are years where when we simply have three hundred and sixty six days, which means we have
one additional day added to the end of the shortest month, which is February, which means that when
usual year goes on, standard years, we have just 28 days on February.
But there are years when we have 29 days.
And it means that in these years they are called leap year.
And during these years we will have 366 days in this year.
So basically that's the difference between a leap year and not to leap year.
And now all we have to do is simply to write a program that will check if a given year is leap or not,
if it's leap year or not.
And basically there are a couple of conditions that should be satisfied.
OK, I will just summarise everything to you right now that basically, if these conditions will be
satisfied, then we can say that a given year is leap year.
And if some of them were one of them is not satisfied, then we can absolutely say that this year is
not a leap year and this year will contain and just three hundred and sixty five days as usual.
So what is the first condition?
Let's say that the first condition is going to be like this.
If the year can be divided by four without a remainder, then it's probably a leap year.
OK, not 100 percent sure, but that's one of the conditions that we are going to use.
So if the year can be divided by four without a remainder, then probably it's OK.
But if the year can also be divided by a hundred without a remainder, then it's not a leap year.
OK, so we have some some sort of combination between different conditions that based on the result
of all of them, we may conclude if a year is leap or not.
OK, so if the year can also be divided by a hundred, then it's not a leap year.
But if this year it can be divided by 400, then it's a leap year.
OK, so I don't know how to put it straight, guys, but basically these are just the conditions for
satisfying, for satisfying of the result of leap year or not leap year.
I think that take a couple of moments to read once again.
OK, just to make sure you understand it.
And I, I think that encoding these things will look much easier for you because we will have a couple
of conditions and it will be like not so variable and it will be like straight to the point and you
will see exactly how to solve this problem with the leap year.
So I'll see you in the Solutions video.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.