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

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

IBM Db2 11 1 Certification Guide Explore Techniques To Master Database Programming And Administration Tasks In IBM Db2

Authors: Mohankumar Saraswatipura ,Robert Collins

1st Edition

1788626915, 978-1788626910

More Books

Students also viewed these Databases questions

Question

ethyl trimethyl acetate line formula

Answered: 1 week ago