Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2014
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.34 KB | None | 0 0
  1. import calendar
  2. def main():
  3.     y = int(input("Enter year: "))
  4.     print(y)
  5.     '''Divide y by 19 and call the remainder a. Ignore the quotient. '''
  6.     a = (y%19)
  7.  
  8.     '''Divide y by 100 to get a quotient b and a remainder c. '''
  9.     b = int(y/100)
  10.     c = (y%100)
  11.  
  12.     '''Divide b by 4 to get a quotient d and a remainder e. '''
  13.     d = int(b/4)
  14.     e = (b%4)
  15.  
  16.     '''Divide 8 * b + 13 by 25 to get a quotient g. Ignore the remainder. '''
  17.     g = int((8*b + 13)/25)
  18.  
  19.     '''Divide 19 * a + b - d - g + 15 by 30 to get a remainder h. Ignore the quotient.'''
  20.     h = ((19*a + b - d - g + 15)%30)
  21.  
  22.     '''Divide c by 4 to get a quotient j and a remainder k. '''
  23.     k = (c%4)
  24.     j = int(c/4)
  25.  
  26.     '''Divide a + 11 * h by 319 to get a quotient m. Ignore the remainder. '''
  27.     m = int((a + 11*h)/319)
  28.  
  29.     '''Divide 2 * e + 2 * j - k - h + m + 32 by 7 to get a remainder r. Ignore the quotient.'''
  30.     r = ((2*e + 2*j - k - h + m + 32)%7)
  31.  
  32.     '''Divide h - m + r + 90 by 25 to get a quotient n. Ignore the remainder. '''
  33.     n = int((h - m + r + 90)/25)
  34.  
  35.     '''Divide h - m + r + n + 19 by 32 to get a remainder p. Ignore the quotient.'''
  36.     p = ((h - m + r + n + 19)%32)
  37.  
  38.     ''' Set the name of the month '''
  39.     month = calendar.month_name[int(n)]
  40.  
  41.  
  42.  
  43.     print("In {0} Easter Sunday is on {1} {2}".format(y, p, month))
  44. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement