Question: In Python: A formula for computing Easter is a follows: let a = year % 19, b = year % 4, c = year %

In Python:

A formula for computing Easter is a follows: let a = year % 19, b = year % 4, c = year % 7, d = (19a + 24)% 30, e = (2b +4c +6d + 5) % 7. The date of Easter is March 22 + d + e (which could be in April). This formula for Easter works for every year in the range 1900 2099 except for 1954, 1981, 2049, and 2076. For these 4 years it produces a date that is one week too late.

Write a program that will calculate the date for Easter within the range of 1900 2099. The program inputs a year, verifies that it is in the proper range, and prints out the date of Easter that year. Try the program for the following years: 1899, 1981, 2018, and 2019

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!