Write a Python program that calculates and displays the time and the week day. Your program should be a menu-driven program that does the following: - Displays the current time in 12-hour format (hh:mm:ss) - Displays the current time in 24-hour format (hh:mm:ss) -Displays the elapsed time of the day in seconds -Displays the remaining time of the day in seconds -Displays the current day of the week -Calculates the day of the week in the past/future (user will enter an integer representing the number of days in the past and the future) The functionality of the program shoudl be represented as menu options. Once the user makes a selection, your program will calculate and display the result associated with the user's selection. Your program should contain the following functions:

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
100%

Write a Python program that calculates and displays the time and the week day. Your program should be a menu-driven program that does the following:
- Displays the current time in 12-hour format (hh:mm:ss)
- Displays the current time in 24-hour format (hh:mm:ss)
-Displays the elapsed time of the day in seconds
-Displays the remaining time of the day in seconds
-Displays the current day of the week
-Calculates the day of the week in the past/future (user will enter an integer representing the number of days in the past and the future)

The functionality of the program shoudl be represented as menu options. Once the user makes a selection, your program will calculate and display the result associated with the user's selection. Your program should contain the following functions:
1) Menu: this function will be used to display the available choices
a. takes no parameters
2)displayTime24Hour
a. takes a datetime object as parameter
3)displayTime12hour
a. takes a datetime object as parameter
4)displayElapsedTime
a.takes a datetime object as parameter
5)displayRemainingTime
a.takes multiple parameters
6)displayWeekday
a. takes a datetime object as parameter
7)displayCalcWeekDay
a. takes an integer as parameter

Expert Solution
steps

Step by step

Solved in 3 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