Write a program that reads the amount of coins collected at the end of each day...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program that reads the amount of coins collected at the end of each day of a month in a local supermarket and calculates the total amount in fils (1 AED = 100 fils). The program reads the data for the entire month from the file coins.txt (assume the month has 30 days). The input file has one line for each day where each line has: number of fils, space, number of 5-fils, space, number of 10-fils, space, number of 25-fils, space, and number of 50-fils. Make sure that the total amount is displayed with exactly two decimals. For the sake of testing your program consider an input file where the first 29 lines, each contains 00000 and the last line are 1 1 1 1 1. This means the file is for a month where no coins where collected in the first 29 days. The output should be 0.91 AED. Now if you test your program for having 0 0 000 for the first 28 days and for the last 2 days, we have: 77 117 430 705 520 89 320 414 833 850 Then the answer is shown below: Sample run (with the above file): Total amount collected is: AED 1178.32 Process returned 0 (0xe) execution time: 0.263 s Press any key to continue. Write a program that reads the amount of coins collected at the end of each day of a month in a local supermarket and calculates the total amount in fils (1 AED = 100 fils). The program reads the data for the entire month from the file coins.txt (assume the month has 30 days). The input file has one line for each day where each line has: number of fils, space, number of 5-fils, space, number of 10-fils, space, number of 25-fils, space, and number of 50-fils. Make sure that the total amount is displayed with exactly two decimals. For the sake of testing your program consider an input file where the first 29 lines, each contains 00000 and the last line are 1 1 1 1 1. This means the file is for a month where no coins where collected in the first 29 days. The output should be 0.91 AED. Now if you test your program for having 0 0 000 for the first 28 days and for the last 2 days, we have: 77 117 430 705 520 89 320 414 833 850 Then the answer is shown below: Sample run (with the above file): Total amount collected is: AED 1178.32 Process returned 0 (0xe) execution time: 0.263 s Press any key to continue.
Expert Answer:
Answer rating: 100% (QA)
Python implementation of the program def readinput Reads the input file and returns a list of lists ... View the full answer
Related Book For
Cost Accounting Foundations and Evolutions
ISBN: 978-1111626822
8th Edition
Authors: Michael R. Kinney, Cecily A. Raiborn
Posted Date:
Students also viewed these computer network questions
-
The following graph shows the daily market for jeans. Suppose the government institutes a tax of $11.60 per pair. This places a wedge between the price buyers pay and the price sellers receive. 50 45...
-
Compare two versions of the two-period depletable resource model that differ only in the treatment of marginal extraction cost. Assume that in the second version the constant marginal extraction cost...
-
Give some examples of everyday vibrating objects. Which exhibit SHM, at least approximately?
-
Consider the Northern Airplane Co. production scheduling problem presented in Sec. 9.1 (see Table 9.7). Formulate this problem as a general linear programming problem by letting the decision...
-
Define a sequence of correlated random numbers \[ s_{k}=\alpha s_{k-1}+(1-\alpha) r_{k} \] where \(r_{k}\) is a unit-variance, uncorrelated, Gaussian pseudorandom number while \(0
-
Gregory and Lulu Clifdens Tax Return Gregory R. and Lulu B. Clifden live with their family at the Rock Glen House Bed & Breakfast, which Gregory operates. The Bed & Breakfast (B&B) is located at...
-
The unemployment rate among workers under 25 in a populous state went from 8.9% to 6.7% in one year. Assume an average of 1 comma 340 comma 500 workers and estimate the decrease in the number...
-
At the beginning of Year 1, your auto-insurance premium for the next year is $300. If you have zero accidents in a year, your premium for the next year drops 10 percent; if you have one accident in a...
-
A person draws a single card from a 52-card deck. Consider the following two events: Drawing a black card (club or spade) Mutually exclusive? Prove mathematically. Independent? Prove mathematically....
-
Assume that annual interest rates are 6% in the United States and 9% in Switzerland. An FI can borrow (by issuing CDs) or lend (by purchasing CDs) at these rates. The spot rate is Sf1.35/$ a. If the...
-
On January 1, 2021, Bard Ltd. has a Class 8 (20% rate) UCC balance of $32,400. The Class 8 property are used in the company's business. The only transaction involving Class 8 property during 2021 was...
-
Amanda and George are married filing jointly. For 2022, they have the following: 46,000 Salary Tips 11,000 Cash gift from George's mom 13,000 8,000 Alimony from Amanda's x-husband* Income from...
-
Joe and Jill Bean, married taxpayers, expect to be subject to the ANT again this year. Near the end of the year, their ANT liability exceeds their regular tax liability by $30,000. Currently, Joe and...
-
Q4. 15%, Extractions from Statistics Dept History table Chair's Mag Department History Contact Us The department website is welcome to seek our history page over 40 years. Task to do 1. download this...
-
Discuss the effects that an impending labor shortage might have on the following three subfunctions of human resource management: selection and placement, training and career development, and...
-
2. Assume a person bends forward to lift a load "with his back" as shown in Figure P12.42a. The person's spine piv- ots mainly at the fifth lumbar vertebra, with the principal supporting force...
-
Do cost drivers exist in a traditional accounting system? Are they designated as such? How, if at all, does the use of cost drivers in a traditional accounting system differ from those in an...
-
The founder and president of the Institute for Healthcare Improvement, Donald Berwick, is convinced that the U.S. health-care system can reduce costs by 30 percent while improving overall...
-
Why would regression analysis provide a more accurate cost formula than the high low method for a mixed cost?
-
The data in Table 2 represent the results of a survey in which 200 people were asked their means of travel to work. (a) Use the survey data to build a probability model for means of travel to work....
-
Sophia has three tickets to a concert, but Yolanda, Michael, Kevin, and Marissa all want to go to the concert with her. To be fair, Sophia randomly selects the two people who can go with her. (a)...
-
Suppose that a survey asked 500 families with three children to disclose the gender of their children and found that 180 of the families had two boys and one girl. (a) Estimate the probability of...
Study smarter with the SolutionInn App