Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Unlimited Attempts Allowed Details Introduction For centuries, one of the most important mathematical tasks in Europe was to accurately calculate the date of Easter. The

Unlimited Attempts Allowed
Details
Introduction
For centuries, one of the most important mathematical tasks in Europe was to accurately calculate the date of Easter. The formulas to calculate this
date was known as a computus. Notice that the word computer and computus both originate from the same root. In fact, some of said that calculating
the date of Easter was the first "computer" program. In this assignment, you will write a simple program to calculate the date of Easter for any year a
user inputs.
Expectations
Your program should do the following tasks:
Ask the user for the year they would like to find the date of Easter for.
Calculate the date of easter for that year. Build a function that performs this calculation.
Print out the message (using F-strings): "The date of Easter for {year} is {date}".
Gauss's Easter Computus Algorithm
a-year mod 19
b-year mod 4
c-year mod7
k-floor(year/100)
p= floor (13+8**k25)
q= floor (k4)
M=(15-p+k-q)mod30
N=(4+k-q)mod7
d=(19**a+M)mod30
e=(2**b+4**c+6**d+N)mod7
April-d+e-9
(Optional) If d=28,e=6, and (11**M+11)mod3019, April=April-7
(Optional) If d=29 and e=6, April=April-7
If April>0, then Easter is in April otherwise Easter is in March
If Easter is in March, the date is March=22+d+e
Notes
The syntax to calculate xmody is x%y
The syntax to calculate floor (xy) is x??y
Steps 12 and 13 require slightly more complex coding than we've covered so far. While technically required for the proper calculation, I won't take
out if you skip these steps
image text in transcribed

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

MFDBS 91 3rd Symposium On Mathematical Fundamentals Of Database And Knowledge Base Systems Rostock Germany May 6 9 1991

Authors: Bernhard Thalheim ,Janos Demetrovics ,Hans-Detlef Gerhardt

1991st Edition

3540540091, 978-3540540090

More Books

Students also viewed these Databases questions