Write a program in python that computes the date of Easter Sunday for a specified year. 1.Ask the user for the year (such as 2001). Save the year in y. 2. Divide y by 19 and call the remainder a. Ignore the quotient. 3.Divide y by 100 to get a quotient b and a remainder c. 4.Divide b by 4 to get a quotient d and a remainder e. 5. Divide 8 * b + 13 by 25 to get a quotient g. Ignore the remainder. 6.Divide 19 * a + b - d - g + 15 by 30 t get a remainder h. Ignore the quotient. 7. Divide c by 4 to get a quotient j and a remainder k. 8. Divide a + 11 * h by 319 to get a quotient m. Ignore the remainder. 9. Divide 2 * e + 2 * j - k - h + m + 32 by 7 to get a remainder r. Ignore the quotient. 10. Divide h - m + r + 90 by 25 to get a quotient n. Ignore the remainder. 11. Divide h - m + r + n + 19 by 32 to get a remainder p. Ignore the quotient.
y = int(input("Enter year: ")) a = y % 19 print("a =",a) (b, c) = divmod(y,100) print("b =",b) print("c =",c) (d, e) = divmod(b,4) print("d =",d) g = (8*b+13)//25 print("g =",g) h = ( 19 * a + b - d - g + 15)%30 print("h =",h) (j, k) = divmod(c,4) print("j =",j) print("k =",k) m = (a + 11 * h)//7 print("m =",m) r = ( 2 * e + 2 * j - k - h + m + 32) % 7 print("r =",r) n = (h - m + r + 90)%25 print("n =",n) p = (h - m + r + n + 19)%12 print("p =",p)
Get Answers For Free
Most questions answered within 1 hours.