Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import calendar
- def main():
- y = int(input("Enter year: "))
- print(y)
- '''Divide y by 19 and call the remainder a. Ignore the quotient. '''
- a = (y%19)
- '''Divide y by 100 to get a quotient b and a remainder c. '''
- b = int(y/100)
- c = (y%100)
- '''Divide b by 4 to get a quotient d and a remainder e. '''
- d = int(b/4)
- e = (b%4)
- '''Divide 8 * b + 13 by 25 to get a quotient g. Ignore the remainder. '''
- g = int((8*b + 13)/25)
- '''Divide 19 * a + b - d - g + 15 by 30 to get a remainder h. Ignore the quotient.'''
- h = ((19*a + b - d - g + 15)%30)
- '''Divide c by 4 to get a quotient j and a remainder k. '''
- k = (c%4)
- j = int(c/4)
- '''Divide a + 11 * h by 319 to get a quotient m. Ignore the remainder. '''
- m = int((a + 11*h)/319)
- '''Divide 2 * e + 2 * j - k - h + m + 32 by 7 to get a remainder r. Ignore the quotient.'''
- r = ((2*e + 2*j - k - h + m + 32)%7)
- '''Divide h - m + r + 90 by 25 to get a quotient n. Ignore the remainder. '''
- n = int((h - m + r + 90)/25)
- '''Divide h - m + r + n + 19 by 32 to get a remainder p. Ignore the quotient.'''
- p = ((h - m + r + n + 19)%32)
- ''' Set the name of the month '''
- month = calendar.month_name[int(n)]
- print("In {0} Easter Sunday is on {1} {2}".format(y, p, month))
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement