Question: Need the answer in python. Thank you! Question 1: Zeller's Algorithm Zeller's Algorithms Opowikipedia wiele 27) men of determining on which day of the week
Question 1: Zeller's Algorithm Zeller's Algorithms Opowikipedia wiele 27) men of determining on which day of the week a date fell (or will fall). In this question you will write program that asks user for a date March 4, 2013) and outputi the day of the week leg Monday) Ask the user to cater a month, in textie. March). The orithm needs the number for the month, where Murchis 3. April is 4. December is 12. January 13, and February is 14. Call this number A You must check that the user has entered aval month and convert it to the appropriate number, Ir the use has not entered a valid month, ak them to try again until they do enter a valid month This algorithm uses January & February as months 13 and 14 of the preceding year meaning that for those months you will need to subtract from the yeat the user enters below. ASSIGNMENTS DEPARTMENT AND COURSE NUMBER COMP 1012 Ask the user to enter the day of the month (e g. 4). Call this number B Confirm that the day is valid for the month that was previously entered leg, do not accept 30 for February). Ask the we to try again if necessary. Ask the user to enter a year. Zeller's algorithm has limitations but let's assame it works for any four-digit year (1000 to 9999). Ask the user to try again if they do not enter a four diptycar The year should be broken into C, the year within the century leg. 14 for 2014. and the century (eg. 20 for 2014) The day of the week (0 Saturday, I = Sunday, ete) can be found as ***+B+C+50) mod > where all division is integer division (remainder discarded Your program should convert dates as long as the user wants. Ask the weathey would like to cater another date, and repeat the above until the user indicates they want to stop You can verify that your program is working by looking a calendar, such as htwadde det (3 (4+1). Sample program output (blue text is typed by the user} Please enter the month: March Please enter the day of the month: 4 Please enter the year: 2013 March 4, 2013 is a Monday Would you like to convert another date y Please enter the month January Please enter the day of the month: 16 Please enter the year: 1973 January 16, 1973 is a Tuesday Would you like to convert another date? Progras terminated normally
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
