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
-
After the tangible assets have been adjusted to current market prices, the capital accounts of Elayne Summers and Murv Newcomb have balances of $82,000 and $131,000, respectively. Rose Clayton is to...
-
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...
-
On July 23 of the current year, Dakota Mining Company pays $7,038,000 for land estimated to contain 9,384,000 tons of recoverable ore. It installs and pays for machinery costing $1,126,080 on July...
-
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...
-
The income statement for Tremblant Limited is presented here: TREMBLANT LIMITED Income Statement Year Ended December 31, 2015 Service revenue...
-
If a firm cannot generate enough revenues to cover its _________ costs, then it will have larger losses if it operates than if it shuts down in the short run.
-
How can we create high-performance teams?
-
The controller at Lawrence Components asks for your help in sorting out some cost information. She is called to a meeting, but hands you the following information for April: Prime costs, April . . ....
-
Solve the equation on the interval 0s0 <2x 2 sin 20+7 sin 0+5=0 Question 6 of 10 > This quiz: 30 point(s) possible Sub This question: 3 point(s) possible What is the solution in the interval 050 <2x?...
-
The sample function of a Gaussian process of zero mean and unit variance is uniformly sampled and then applied to a uniform quantizer having the input-output amplitude characteristic shown in Figure....
-
A company compares between two external service centers , the first can serve on average 50 customers per hour and the second can serve on average 40 customers per hour it is assumed that service...
-
The liquid line departmental manager of Colgate Palmolive, which produces various personal care items including toothpaste is analysing the first 10 months of its performance. The standard ratio of...
-
Imperial Jewelers manufactures and sells a gold bracelet for $ 4 0 9 . 0 0 . The company s accounting system says that the unit product cost for this bracelet is $ 2 6 7 . 0 0 as shown below: Direct...
-
How can businesses use the resources of the Export-Import Bank of the United States to finance global business expansion?
-
What role does statistical mechanics play in elucidating the thermodynamic behavior of complex systems, particularly regarding fluctuations and non-equilibrium phenomena ?
-
A regional firm has a cost of debt of 8.5 percent while its cost of equity is 15.50 percent. The firm reports debt of $40,000 and equity of $55,000. If the tax rate is 21.0 percent, what is the...
-
What is the impact of normal aging? What are the signs and symptoms of normal aging? What is the prognosis? What management of normal aging is needed? What future challenges might be anticipated...
-
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?
-
Indirect on the Dollar. Calculate the forward premium on the dollar (the dollar is the home currency) if the spot rate is 1.3300/$ and the 3-month forward rate is 1.3400/$.
-
Around the Horn (A). Assuming the following quotes, calculate how a market trader at Citibank with $1,000,000 can make an intermarket arbitrage profit. Banks Spot Rates Citibank $1.6194/ National...
-
Direct on the Dollar. Calculate the forward discount on the dollar (the dollar is the home currency) if the spot rate is $1.5800/ and the 6-month forward rate is $1.5550/.
Study smarter with the SolutionInn App