Question: (Python) Write the function the output should as same as the example Easter Sunday is the first Sunday after the first full moon of spring.

(Python) Write the function

the output should as same as the example

(Python) Write the function the output should as same as the example

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. lgnore the quotient. 10. Divide (h - m + r+ 90) by 25 and save the quotient as n. Ignore the remainder. 11. Divide (h -mtr+n+ 19) by 32 and save the remainder as p. lgnore 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 . Note: This question uses exact matching, so white space matters. If you can't see why your answer is being marked wrong, click the Show differences button For example Input Result 2001 Please enter the year: 2001 In 2001 , Easter Sunday fell on month 4, day 15. Please enter the year: 2005 In 2005 , Easter Sunday fell on month 3 , day 27 . 2005

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!