please code in python Zeller's congruence is a method to determine the day of the week (e.g., Sunday, Monday, etc.) from a calendar date given the day (d), modified-month (m) and year (y): Note that all division operations in the formula above indicate integer, or truncated division. For example, should be read as (26 * (m + 1)) // 10, not  (26 * (m + 1)) / 10. The modified-month value only applies to the months of January and February, which are counted as months 13 and 14 of the previous year: e.g., 13 = Jan, 14 = Feb, 3 = Mar, 4 = Apr, 5 = May, . . . 12 = Dec. For example, 2/21/2014 (Feb 21, 2014) would be represented as 14/21/2013.  Also note, algebraic constructs like 26(m + 1) in the equation above must be translated to Python (i.e.,  26 *(m + 1) ). Zeller's congruence gives the day of the week starting with 0 = Monday, 1 = Tuesday and so on. Write a program that will input a date as three separate integer values (month, day, and year) and return the day-of-the-week value as determined by Zeller's method.  See the examples below. Example: Enter month: 2 Enter day: 28 Enter year: 2014 2/28/2014 is a Friday   Enter month: 2 Enter day: 28 Enter year: 2000 2/28/2000 is a Monday     Enter month: 2 Enter day: 29 Enter year: 2000 2/29/2000 is a Tuesday

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

please code in python

Zeller's congruence is a method to determine the day of the week (e.g., Sunday, Monday, etc.) from a calendar date given the day (d), modified-month (m) and year (y):

Note that all division operations in the formula above indicate integer, or truncated division. For example, should be read as (26 * (m + 1)) // 10, not  (26 * (m + 1)) / 10. The modified-month value only applies to the months of January and February, which are counted as months 13 and 14 of the previous year: e.g., 13 = Jan, 14 = Feb, 3 = Mar, 4 = Apr, 5 = May, . . . 12 = Dec. For example, 2/21/2014 (Feb 21, 2014) would be represented as 14/21/2013Also note, algebraic constructs like 26(m + 1) in the equation above must be translated to Python (i.e.,  26 *(m + 1) ).

Zeller's congruence gives the day of the week starting with 0 = Monday, 1 = Tuesday and so on.

Write a program that will input a date as three separate integer values (month, day, and year) and return the day-of-the-week value as determined by Zeller's method.  See the examples below.

Example:

Enter month: 2

Enter day: 28

Enter year: 2014

2/28/2014 is a Friday

 

Enter month: 2

Enter day: 28

Enter year: 2000

2/28/2000 is a Monday

 

 

Enter month: 2

Enter day: 29

Enter year: 2000

2/29/2000 is a Tuesday

d+5+
26(m + 1)
+
5(y % 100) 21(y/100)
+
%7
10
4
4
Transcribed Image Text:d+5+ 26(m + 1) + 5(y % 100) 21(y/100) + %7 10 4 4
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY