Python Compiler
start = 2000 end = 2030 print("Leap years between %d and %d: " %(start, end)) for start in range(start, end): if(start % 4 == 0): if((start % 100 == 0) and (start % 400 != 0)): pass else: print(start, end=" ")
OUTPUT
Leap years between 2000 and 2030:
2000 2004 2008 2012 2016 2020 2024 2028
×

Save as Private