Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you check if my app meets the critearia or if there is anything I need to tweak ?? oclapterns/section/8?content resource_id-25583003 n State U... 0

image text in transcribed

Can you check if my app meets the critearia or if there is anything I need to tweak ??

oclapterns/section/8?content resource_id-25583003 n State U... 0 Mail -j.becerraferna... D Ver Serie de TV Jue. My library > Cpts 111 home >38: Doomsday AlgorithmII zyBooks catalog ) Help/FAQ Jose Be 3.8 Doomsday Algorithm II In Lab #2 you wrote a program to calculate a year's Doomsday. One of the input items was the last two digits of the year For example, for 2017 a user would enter 17. In this program youll modify the input so that a user will input the fullyear, e.g, 2017, and your program will have to extract the last two digits to find a year's Doomsday. Extraction can be done using the divmod() function. Recall that the equation for the Doomsday is given by Doomsday = (((yr 11 12) 12) // 4) % 7 + anchor) %7 where yr is the last two digits of the year and anchor is an integer between 0 and 7 with 0 corresponding to Sunday and 7 to Saturday. The chor day for 1900-1999 is Wednesday (- 3) and the anchor day for 2000-2099 is Tuesday (-2), Write a program that calculates a years Doomsday Prompt the user for the four-digit year and for the anchor day as an integer. An example follows Enter the year in four digits: 2005 er the anchor day as an integer [0-Sunday, 7-Saturdayl:2 Doomsday = 1 ACTINTY 3,8.1: Doomsday Algorithm I 0/15 zypa2.py 1 a -intCinput( Enter the yeor in four digits: 0) 2 c-intCinputC Enter the anchon day as on interger [0-Sunday, 7-Saturday]: 0) 3 b, e-divmod(a, 2000) 4 d. (((a//12).(0%12)(aX12)//4)%7+ b)%7 6 printC Doomsday ,d)

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

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions

Question

=+j on to staff their operations in the global marketplace.

Answered: 1 week ago