Write a program to accept a weekday and a time (composed of hour and minute) in...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program to accept a weekday and a time (composed of hour and minute) in 24-hour format. The user further inputs a number of minutes to be added to (or subtracted from) the time. Then it outputs the resulted day and time in 2-digit 24-hour format. 3rd digit of your student ID Odd Even Number of minutes to be ... Added Subtracted User inputs: 1. day (a string, abbreviation of weekdays: Sun, Mon, Tue, Wed, Thu, Fri, Sat) 2. hour (an integer from 0 to 23, inclusive) 3. minute (an integer from 0 to 59, inclusive) 4. number of minutes (a non-negative integer) Program outputs: 1. day and time in 2-digit 24-hour format Sample display (for odd) Mon 12 34 2468 Wed 05 42 Sample display (for even) Mon 12 34 2468 Sat 19 26 Remark: • 2468 minutes = 1 day 17 hours 8 minutes. • The number of minutes to add (or subtract) can be any non-negative integer. The result may be many weeks later (or before). • The output time is displayed in 2-digit 24-hour format. Write a program to accept a weekday and a time (composed of hour and minute) in 24-hour format. The user further inputs a number of minutes to be added to (or subtracted from) the time. Then it outputs the resulted day and time in 2-digit 24-hour format. 3rd digit of your student ID Odd Even Number of minutes to be ... Added Subtracted User inputs: 1. day (a string, abbreviation of weekdays: Sun, Mon, Tue, Wed, Thu, Fri, Sat) 2. hour (an integer from 0 to 23, inclusive) 3. minute (an integer from 0 to 59, inclusive) 4. number of minutes (a non-negative integer) Program outputs: 1. day and time in 2-digit 24-hour format Sample display (for odd) Mon 12 34 2468 Wed 05 42 Sample display (for even) Mon 12 34 2468 Sat 19 26 Remark: • 2468 minutes = 1 day 17 hours 8 minutes. • The number of minutes to add (or subtract) can be any non-negative integer. The result may be many weeks later (or before). • The output time is displayed in 2-digit 24-hour format.
Expert Answer:
Answer rating: 100% (QA)
Python def addminutesday hour minute minutestoadd weekdays Sun Mon Tue Wed Thu Fri Sat Convert the i... View the full answer
Related Book For
Systems analysis and design
ISBN: 978-0136089162
8th Edition
Authors: kenneth e. kendall, julie e. kendall
Posted Date:
Students also viewed these programming questions
-
The Taylor polynomial for sin(x) for a near 0 to order 5 is 1 1 sin(x) = x - + -x +0(x7) 6 120 The figure below shows a plot of sin(x) [blue] and the above Taylor polynomial [red]. 0.8 0.6 0.4 0.2 1...
-
Rewrite the PrintCalendar class in Listing 6.12 to display a calendar for a specified month using the Calendar and GregorianCalendar classes. Your program receives the month and year from the command...
-
It is clear that Jaguar practices responsibility toward the environment. Using your knowledge gained from this Jaguar case study and further research, provide five (5) examples of how Jaguar is...
-
The cohesive energy density, V ,is defined as U/V, where U is the mean potential energy of attraction within the sample and V its volume. Show that v= N fV(R)dr, where 91
-
Four couples at a dinner party play a board game after the meal. They decide to play as teams of two and to select the teams randomly. All eight people write their names on slips of paper. The slips...
-
Shiloh supplies equipment to the automotive and commercial vehicle markets and other industrial customers. It specializes in materials and designs that reduce vehicle weight and increase fuel...
-
Green Day Corporation has outstanding 400,000 shares of $10 par value common stock. The corporation declares a 5% stock dividend when the fair value of the stock is $65 per share. Prepare the journal...
-
20. a) Choose an algebraic method to solve the following linear system. Explain why you chose this method. 2 3x 2 2y 3 7 3 + 2y = 5 b) Use the method you chose to solve the system. Check your...
-
Harriet's Hats is a retailer who buys hats from a manufacturer and then sells them in its stores. The following information includes the company's December 31, 20Y8 Balance Sheet and the details of...
-
Write python walmart shopping program welcoome to walmart shopping center 1. add item to cart .(max 5 products, upon 6 product message cart is full) 2.search item 3.delete the item 4.quite
-
Microsoft Project is a Microsoft proprietary software application developed for project management. Using the Internet resources describe this software application. What are its features and...
-
For a manager engaging in equity market-neutral pairs trading, how are longs and shorts matched?
-
A risk-averse investor's goal is to create a portfolio that maximizes return for a given level of risk. Question 7 options: True False
-
Write a Java program that uses the ForkJoinPool to perform a parallel merge sort algorithm.
-
Solve rational equations x^(7)C Solve for s. (s-4)/(s+2)=(s+6)/(s+7)
-
Company P has internally generated net income of $200,000 (excludes share of subsidiary income). Company P has 100,000 shares of outstanding common stock. Subsidiary Company S has a net income of...
-
The ultimate goal of Google, Bing, and other consumer search engines is to provide users with search listings that contain useful information on the topic of their search. What recommendations would...
-
Clancys is interested in graphical output for its DSS. It wants to see a graphical comparison of how many of each style of uniform are being sold each year. a. Choose an appropriate graph style and...
-
What four kinds of information is the analyst seeking through prototyping?
-
What information is contained in the data repository?
-
Screening Model. Consider the following weighted criteria for assessing the viability of different charity event project proposals. Cost (3) Location (4) Team expertise (3) Celebrity endorsement...
-
Profile Model. Using the information from the profile model in Problem 3.18, construct an argument as to why project B is preferable to project C. Problem 3.18 Profile Model. Assume the project...
-
Discounted Payback. Your company is considering a high-risk project that could yield strong revenues but will involve a significant up-front investment. Because of this risk, top management is...
Study smarter with the SolutionInn App