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?
While defining a function which of the following symbol is used.
What is a function?
Write the different types of functions.
Differentiate ceil() and floor() function?
Explain the different types of functions with an example.
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.
type()
Explain the following built-in function.
pow()
