using loop check if a year given by user is leap year or not code example Example: python check if year is a leap year import calendar print(calendar.isleap(1900))