Easter3

Calculate the date of Easter, accurate from 1900 to 2368 inclusive
Easter is celebrated on the first Sunday after the first full moon on or after 21 March.

import sys y=int(sys.argv[1]) c=y//100;n=y-19*(y//19);k=(c-17)//25;i=c-c//4-(c-k)//3+19*n+15 i=i-30*(i//30);i=i-(i//28)*(1-(i//28)*(29//(i+1))*((21-n)//11)) j=y+y//4+i+2-c+c//4;j=j-7*(j//7);l=i-j;m=3+(l+40)//44;d=l+28-31*(m//4) print (m,d,y,sep="/")
 * 1) !/usr/bin/python3



Calculate for a range of years
import sys a=int(sys.argv[1]) b=int(sys.argv[2]) for y in range (a, b+1, 1): c=y//100;n=y-19*(y//19);k=(c-17)//25;i=c-c//4-(c-k)//3+19*n+15 i=i-30*(i//30);i=i-(i//28)*(1-(i//28)*(29//(i+1))*((21-n)//11)) j=y+y//4+i+2-c+c//4;j=j-7*(j//7);l=i-j;m=3+(l+40)//44;d=l+28-31*(m//4) print (m,d,y,sep="/")
 * 1) !/usr/bin/python3