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
shaalaa.com
Introduction to Python Functions
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
APPEARS IN
संबंधित प्रश्न
Which function is called anonymous un-named function?
Pick the correct one to execute the given statement successfully.
if ______ : print(x, " is a leap year")
What is a function?
How to set the limit for recursive function? Give an example.
Differentiate ceil() and floor() function?
Explain the following built-in function.
id()
Explain the following built-in function.
chr()
Explain the following built-in function.
round()
Explain the following built-in function.
type()
Explain the following built-in function.
pow()
