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 Function which calls itself is called as ______
Read the following statement and choose the correct statement.
In Python, you don’t have to mention the specific data types while defining the function.
Pick the correct one to execute the given statement successfully.
if ______ : print(x, " is a leap year")
Write the different types of functions.
How to set the limit for recursive function? Give an example.
What are the points to be noted while defining a function?
Write a Python code to find the L.C.M. of two numbers.
Explain the following built-in function.
id()
Explain the following built-in function.
chr()
Explain the following built-in function.
type()
