Question: python question Easter Sunday is the first Sunday after the first full moon of spring. To compute the date, you can use this algorithm, invented

python question  python question Easter Sunday is the first Sunday after the first

Easter Sunday is the first Sunday after the first full moon of spring. To compute the date, you can use this algorithm, invented by the mathematician Carl Friedrich Gauss in 1800: 1. Let y be the year (such as 1800 or 2001). 2. Divide y by 19 and save the remainder as a. Ignore the quotient. 3. Divide y by 100 and save the quotient as b and the remainder as c. 4. Divide b by 4 and save the quotient as d and the remainder as e. 5. Divide (8 * b + 13) by 25 and save the quotient as g. Ignore the remainder. 6. Divide (19 * a + b - d - g + 15) by 30 and save the remainder as h. Ignore the quotient. 7. Divide c by 4 and save the quotient as j and the remainder as k. 8. Divide (a + 11 * h) by 319 and save the quotient as m. Ignore the remainder. 9. Divide (2 * e + 2 * j - k - h + m + 32) by 7 and save the remainder as r. Ignore the quotient. 10. Divide (h - m + r + 90) by 25 and save the quotient as n. Ignore the remainder. 11. Divide (h - m + r + n + 19) by 32 and save the remainder as p. Ignore the quotient. Then Easter falls on day p of month n. For example, if the value of y is 2001, then: a = 6, b = 20, c = 1, d = 5, e = 0, g = 6, h = 18, j = 0, k = 1, m = 0, r = 6, n = 4, and p = 15. Therefore, in 2001, Easter Sunday fell on April 15. Write a Python program easterSunday that prompts the user for a value for the year and prints out the month and day of Easter Sunday. Here's an example of a possible sample run: Please enter the year: 2001 In 2001, Easter Sunday fell on month 4, day 15

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!