SHARE

TWEET

# Untitled

a guest
Feb 17th, 2020
82
Never

**Not a member of Pastebin yet?**

**, it unlocks many cool features!**

__Sign Up__- year = int(input('Please enter a year greater than 100:\n'))
- # if (year <= 100):
- # print('Error: Year {0} is less than or equal to 100'.format(year))
- if year % 4 == 0: # is not divisible by 4, it is not a leap year.
- print('{} is a leap year!'.format(year))
- elif (year % 100 == 0) and (year % 400 == 0): # is divisible by 100 but not by 400, it is not a leap year.
- print('{} is a leap year!'.format(year))
- elif (year % 100 and year % 400): # is divisible by 100 and 400, it is a leap year.
- print('{} is a leap year!'.format(year))
- elif (year % 100 == 0) and (year % 4 == 0): # it is a leap year.
- print('{} is a leap year!'.format(year))
- else:
- print('{} is not a leap year!'.format(year))
- if (year <= 100):
- print('Error: Year {0} is less than or equal to 100'.format(year))

RAW Paste Data

We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.