Write the program plz i m getting bug for this hlp me | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
- 1

# Write the program plz i m getting bug for this hlp me

You need to make a program to take a year as input and output "Leap year" if itās a leap year, and "Not a leap year", if itās not. To check whether a year is a leap year or not, you need to check the following: 1) If the year is evenly divisible by 4, go to step 2. Otherwise, the year is NOT leap year. 2) If the year is evenly divisible by 100, go to step 3. Otherwise, the year is a leap year. 3) If the year is evenly divisible by 400, the year is a leap year. Otherwise, it is not a leap year. Sample Input 2000 Sample Output Leap year Use the modulo operator % to check if the year is evenly divisible by a number.

17th Feb 2021, 2:02 PM
+ 4
17th Feb 2021, 2:16 PM
Rš š®š³
+ 3
Seems do be a duplicate... https://www.sololearn.com/Discuss/2699475/?ref=app Please delete the other because it's same as this (only with less info).
17th Feb 2021, 2:17 PM
Matthew
+ 2
17th Feb 2021, 2:06 PM
Rš š®š³
+ 1
year = int(input()) #your code goes here if year%4 == 0: if year%100==0: if year%400==0: print('Leap year') else: print("Not a leap year") else: print('Leap year') else: print("Not a leap year")
7th Nov 2021, 8:57 AM
Chen qian
0
plz go n run the program i dt understand where the bug year = int(input()) if year%4==0: print("Leap year") else: if year%100==0: print("Not a leap year") else: if year%400==0: print("Leap year") else: print("Not a leap year")
17th Feb 2021, 2:08 PM