Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Easter Sunday is the first Sunday after the first full moon of spring. Write a program that computes the date of Easter Sunday for a

Easter Sunday is the first Sunday after the first full moon of spring. Write a program that computes the date of Easter Sunday for a specified year.

Algorithm:

This algorithm was originally invented by the mathematician Carl Friedrich Gauss:

  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 to 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.

Then Easter Sunday falls on day p of the month n. For example, if y is 2001:

 a = 6 b = 20 c = 1 d = 5 e = 0 g = 6 h = 18 j = 0 k = 1 m = 0 r = 6 n = 4 p = 15 

please use python 3 for this quesiton

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

Step: 3

blur-text-image

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

More Books

Students also viewed these Databases questions

Question

5. Choosing People for Expatriate Assignments

Answered: 1 week ago

Question

1. Identify six different types of history.

Answered: 1 week ago

Question

2. Define the grand narrative.

Answered: 1 week ago

Question

4. Describe the role of narratives in constructing history.

Answered: 1 week ago