I am having difficulty looping my function below. I want my program to evaluate multiple years then terminate the program using an appropriate SL value. Is writing a function the wrong approach? Any help is highly appreciated. Thank you! Code below:
def lYr():
year = int(input("Enter a year: "))
while year > 1582:
if int(year) % 4 == 0:
if int(year) % 100 == 0:
if int(year) % 400 == 0:
print("This is a lp-yr!")
break
else:
print("This is not a lp-yr!")
break
else:
print("This is a lp-yr!")
break
else:
print("This is not a lp-yr!")
break
else:
print("enter correct date")
break
lYr()