Question: Start with the current year ( can hard code ) , dsiplay 2 8 future leap years ( 5 per line ) 2 8 leap

Start with the current year (can hard code), dsiplay 28 future leap years (5 per line)
28 leap years starting from 2023 :
20242028203220362040
20442048205220562060
20642068207220762080
20842088209220962104
21082112211621202124
212821322136
number_of_years_per_line =5
count=0
is_leap_year =(year %4==0 and year %100!=0) or (year %400==0)
year =2023
print (f"28 leap years starting from 2023: ")
while count28:
is_leap_year= True
print(year, end="")
count+=1
if count % number_of_years_per_line ==0:
print()
year +=1
20232024202520262027
20282029203020312032
20332034203520362037
20382039204020412042
204820492050
Why is my output not correct? How can I fix it?
Start with the current year ( can hard code ) ,

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!