0
Can anyone find the bug in this code the output is accurate but still showing some bugs,else in leap year program,code here
year = int(input()) if year%4==0: if year%100==0: if year%400==0: print("Leap year") else: print("Not a leap year")
3 Respostas
0
Why do you have the extra two if statements?
if year%100==0:
if year%400==0:
That will make it so you only get about 1 out of every 40 leap years.
Also please always include the programming language in your tags.
0
year = int(input())
if year % 400 == 0:
print('leap year')
elif year % 4 == 0 and year % 100 != 0:
print('leap year')
else:
print('not leap year')
0
Pls someone help paste the leap year question here.