Question: in python format A year's Doomsday is given by the equation Doornsday-((gr. // 12) + (yr % 12) + (yr % 12) // 4) %


in python format
A year's Doomsday is given by the equation Doornsday-((gr. // 12) + (yr % 12) + (yr % 12) // 4) % 7 + anchor) % 7 (1) where yr is the last two digits of the year and the anchor day is an integer between 0 and 6 with 0 corresponding to Sunday and 6 to Saturday. Write a program to calculate a year's Doomsday. Prompt a user for the last two digits of the year and for the anchor day as an integer. Print out the Doomsday. Include the following: A function calc.doom that calculates the doomsday that takes two parameters yr and anchor and returns the doomsday A docstring in the function (i.e., right under the "def" line of the function surrounded by three single or double quotes) that explains the purpose of the function Anchor days for 2000-2099 are Tuesday (-2) and for 1900-1999 Wednesday (-3). Example results are shown below. Enter the last two digits of the year: 05 2 Enter the anchor day as an integer [0-Sunday, 6-Saturday]: 2 Doomsday-1 6 Enter the last two digits of the year: 19 7 Enter the anchor day as an integer [0-Sunday, 6-Saturday]: 2 9 Doomsday - 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
