Toll roads have different fees based on the time of day. Here is the rate during...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Toll roads have different fees based on the time of day. Here is the rate during different time periods: 12:00am to 7:29am -- $1.05 7:30am to 7:29pm -- $2.15 7:30pm to 11:59pm - $1.10 Write a program that would calculate the tolls from the times a user enters. Specifically, your program needs to: 1. let the user enter as many times as they want The program should keep asking the user for another time until the user enters "Done" • The time should be in 12 hour format but without spaces, e.g., "7:02am", "7:39am", "5:35pm", "7:20pm", "10:56pm" ● • Assume the user always enters a valid time 2. calculate the toll for each time the user enters . For example, the toll for "7:02am" is 1.05 3. store all the tolls in a list and print the list at the end of the program Some extra requirements regarding the code: 2. calculate the toll for each time the user enters . For example, the toll for "7:02am" is 1.05 3. store all the tolls in a list and print the list at the end of the program Some extra requirements regarding the code: • Your code should be well organized using functions. o To get the full points for this part, you need to define the main function and at least two other functions. . Global variables are not allowed. . All the calculated tolls have to be stored in a list and then the list is printed as a whole. What it looks after executed: ====== RESTART: /Users/jj2cr/Documents/Mizzou/Courses/INFOTC1040/Sp Add a time: 7:02am Add a time: 5:35pm Add a time: 7:20pm Add a time: Done The tolls for the entered time are: [1.05, 2.15, 2.15] Toll roads have different fees based on the time of day. Here is the rate during different time periods: 12:00am to 7:29am -- $1.05 7:30am to 7:29pm -- $2.15 7:30pm to 11:59pm - $1.10 Write a program that would calculate the tolls from the times a user enters. Specifically, your program needs to: 1. let the user enter as many times as they want The program should keep asking the user for another time until the user enters "Done" • The time should be in 12 hour format but without spaces, e.g., "7:02am", "7:39am", "5:35pm", "7:20pm", "10:56pm" ● • Assume the user always enters a valid time 2. calculate the toll for each time the user enters . For example, the toll for "7:02am" is 1.05 3. store all the tolls in a list and print the list at the end of the program Some extra requirements regarding the code: 2. calculate the toll for each time the user enters . For example, the toll for "7:02am" is 1.05 3. store all the tolls in a list and print the list at the end of the program Some extra requirements regarding the code: • Your code should be well organized using functions. o To get the full points for this part, you need to define the main function and at least two other functions. . Global variables are not allowed. . All the calculated tolls have to be stored in a list and then the list is printed as a whole. What it looks after executed: ====== RESTART: /Users/jj2cr/Documents/Mizzou/Courses/INFOTC1040/Sp Add a time: 7:02am Add a time: 5:35pm Add a time: 7:20pm Add a time: Done The tolls for the entered time are: [1.05, 2.15, 2.15]
Expert Answer:
Answer rating: 100% (QA)
This function converts a time string to minutes past midnight def converttominutestimestr timeparts timestrsplit hours inttimeparts0 minutes inttimepa... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Question 1. Find the derivative of f(x) = (+25)*. Question 2. If f(x)=x (x + 3). Find f'(4).
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
After reading our textbook, slides and watching the lecture video, thoroughly answer the following questions using your own words. Doing so should produce about 100 words per question. Describe the...
-
b) Calculate the Fault Level in MVA if a symmetrical bolted 3-phase fault occurs on the LV side of the 5MVA Transformer at 11kV c) The Tranformer impedance is 6% - Calculate the short circuit current.
-
For the limit illustrate Definition 9 by finding a value of N that corresponds to M = 100. 2x + 1 lim
-
Given the function f(x) = e^ln ( Compute f'(2)
-
Show that an alternate computing formula for the regression sum of squares in a linear regression model is \[S S_{\mathrm{R}}=\sum_{i=1}^{n} \hat{y}_{i}^{2}-n \bar{y}^{2}\]
-
Focusing managerial attention on a single metric may result in undesirable employee behavior and adverse business consequences. For each of the following scenarios, identify the undesirable results...
-
Royal International Bank (RIB) charges an interest rate of 1.25% per month on loans to its customers. Like all lenders, RIB must report an annual percentage rate (APR) to customers. What should the...
-
In December, Northern Kiteboarding magazine collected $80,000 for subscriptions for the next calendar year. The company collects cash in advance and then downloads the magazines to subscribers each...
-
8.Define and describe each of the contingency effectiveness approaches. 9.When would you recommend that the resource-based approach be used to gauge organizational effectiveness? 10.Explain why...
-
What is stand-alone risk?
-
Give an example of financial risk.
-
What is the cost of fund capital to not-for-profit healthcare businesses?
-
What are the problems faced by small businesses when estimating the CCC?
-
What is meant by a firms debt capacity?
-
Encode the following data with a Hamming error code: You may find the parity table attached here helpful. Bit position 1 2 3 4 5 6 7 8 Encoded data bits p1 p2 d1 p4 d2 d3 d4 X X X X XX XX x x x x 18...
-
Integration is a vital concept when applied in one?s life. Integrating your life means making ideal choices. Perfect choices on the other go in line with quality decisions. Quality decisions lead to...
-
Steve Jackson (age 51) is a single taxpayer living at 3215 Pacific Dr., Del Mar, CA 92014. His Social Security number is 465-88-9415. In 2012, Steve's earnings and income tax withholding as the...
-
Please answer the following questions regarding the taxability of Social Security: a. A 68-year-old taxpayer has $20,000 in Social Security income and $100,000 in tax-free municipal bond income. Does...
-
Jan has two jobs during 2012. One employer withheld and paid FICA taxes on $66,600 of Jan's salary, and the other employer withheld and paid FICA taxes on $44,400 in salary paid to Jan. Calculate the...
-
Describe the role of a paralegal in a family law practice.
-
Define family law and identify the kinds of issues that are addressed in a family law practice.
-
Describe the characteristics of effective fee agreements, and identify the various types of fee agreements that may be used in divorce cases.
Study smarter with the SolutionInn App