मराठी

Write a Python code to check whether a given year is a leap year or not.

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
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 7: Python functions - Evaluation [पृष्ठ ११३]
Advertisements
Share
Notifications



      Forgot password?
Use app×