Advertisements
Advertisements
प्रश्न
Write a Python code to check whether a given year is a leap year or not.
Advertisements
उत्तर
n = int (input(“Enter any year”))
if (n % 4 = = 0):
print “Leap year”
else:
print “Not a Leap year”
Output:
Enter any year 2001
Not a Leap year
APPEARS IN
संबंधित प्रश्न
A named block of code that is designed to do one specific job is called ______
Which function is called anonymous un-named function?
While defining a function which of the following symbol is used.
Pick the correct one to execute the given statement successfully.
if ______ : print(x, " is a leap year")
What is a function?
Differentiate ceil() and floor() function?
Explain the different types of functions with an example.
Explain the following built-in function.
id()
Explain the following built-in function.
chr()
Explain the following built-in function.
type()
