Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The objective of this program is to test your ability to perform Python arithmetic, input / output , decision, and repetition statements.Description:The following algorithm will

The objective of this program is to test your ability to perform Python arithmetic, input/output, decision, and repetition statements.Description:The following algorithm will calculate the date of Easter for any year in the twentieth or twenty-first centuries for Western dates. Valid years are 1900 to 2099. Have the user input a positive year.Subtract 1900 from the user input year and call the difference valueD.Divide valueD by 19 and call the remainder valueR.Divide (7* valueR +1) by 19. Discard the remainder and call the quotient valueP.Divide (11* valueR +4 valueP) by 29 and call the remainder valueS.Divide valueD by 4. Discard the remainder and call the quotient valueQ.Divide (valueD + valueQ +31 valueS) by 7 and call the remainder valueT.Easter is on (25 valueS valueT). If this result is greater than zero, Easter for that year occurs in April on that date.If the result is zero or negative Easter for that year falls in March. If the result is 0, Easter for that year falls on March 31(310). If the result is 1, Easter occurs on March 30(311). If the result is 2, Easter occurs on March 29(312), etc. (Hint: What happens when you subtract a negative number (-1) from a number as in (31(-1))?) Assignment:Write a program, name it Easter.py that will ask the user to input a year and calculate the date of Easter for that year. You may need to verify your programs accuracy by doing each step by hand then check your programs values at that point. Your program should produce a single line of output of the form:(Western) Easter Sunday -28 March, 1948.Assume the user always inputs a valid year.Once your program outputs, it should loop back to the beginning and ask the user for another year. If the user inputs a negative year, stop the program, and say ByeSome sample dates:7th April 19014th April 192625th March 195118th April 197630th March 190217th April 192713th April 195210th April 197712th April 19038th April 19285th April 195326th March 197831st March 1929
(On
the left is my codes for the program and on the right is where i ran the program. However eveytime i run the program i get a error message. Please help me correct my codes and figure out what i did wrong)
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

Understanding Databases Concepts And Practice

Authors: Suzanne W Dietrich

1st Edition

1119827949, 9781119827948

More Books

Students also viewed these Databases questions

Question

If the person is a professor, what courses do they teach?

Answered: 1 week ago