Python - User-Defined Functions

Pubblicato il: 02 aprile 2020
sul canale di: Manish Mahour
54
3

#Python #Functions

In this video, I am demonstrating how we can create our own user-defined functions using below mentioned problem.

In the Gregorian calendar three criteria must be taken into account to identify leap years:
The year can be evenly divided by 4, is a leap year, unless:
The year can be evenly divided by 100, it is NOT a leap year, unless:
The year is also evenly divisible by 400. Then it is a leap year.
This means that in the Gregorian calendar, the years 2000 and 2400 are leap years, while 1800, 1900, 2100, 2200, 2300 and 2500 are NOT leap years.
You are given the year, and you have to write a function to check if the year is leap or not.

Sample Input
1990
Sample Output
False


In questa pagina del sito puoi guardare il video online Python - User-Defined Functions della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Manish Mahour 02 aprile 2020, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 54 volte e gli è piaciuto 3 spettatori. Buona visione!