Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems 6th Asian Conference Aciids 2014 Bangkok Thailand April 7 9 2014 Proceedings Part I 9 2014 Proceedings Part 1 Lnai 8397

Authors: Ngoc-Thanh Nguyen ,Boonwat Attachoo ,Bogdan Trawinski ,Kulwadee Somboonviwat

2014th Edition

3319054759, 978-3319054759

More Books

Students also viewed these Databases questions

Question

b. Will new members be welcomed?

Answered: 1 week ago

Question

c. Will leaders rotate periodically?

Answered: 1 week ago

Question

b. Will there be one assigned leader?

Answered: 1 week ago