Here is a simple progarm to tell whether a year is leap or not.
year = input("Enter a year: ")
if year % 4 != 0:
print"\nNot leap year!"
else:
if year % 100 != 0:
print"\nLeap year"
else:
if year % 400 == 0:
print"\nLeap year"
else:
print"\nNot leap year"
I want to prompt user "Do you want to continue..(y/n)" then he will enter choice and loop will iterate again but not able to do that. Any suggestions?