Question: I need help with this programming question A years Doomsday is given by the equation: Doomsday = (((yr // 12) + (yr % 12) +

I need help with this programming question

A years Doomsday is given by the equation: Doomsday = (((yr // 12) + (yr % 12) + (yr % 12) // 4) % 7 + anchor) % 7

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 non-void function get day() that takes as its parameter the doomsday calculated by calc doom(), determines which day of the week it represents (0=Sunday), and returns this day to main(). Use the if-elif-else construct. write a main() function that it prompts the user for a four-digit integer year, extracts the first two and last two digits of the year, calls set anchor which returns the anchor, calls calc_doom() which returns the doomsday, and finally calls get_day() to determine the day of the week which it then prints as the Doomsday. Anchor days for 2000-2099 are Tuesday (=2) and for 1900-1999 Wednesday (=3). Example results are shown below. 1 Enter the year in four digits: 1966 2 Doomsday: Monday 3 4 Enter the year in four digits: 2019 5 Doomsday: Thursday

in python format please

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!