Question: Please explain parts b and c. No code is needed, an explanation will suffice. 2. The Pocket Change Problem. Write a script using iteration to

Please explain parts b and c. No code is needed, an explanation will suffice.

Please explain parts b and c. No code is needed, an explanation

2. The Pocket Change Problem. Write a script using iteration to answer the following question: What is the average number of coins you can expect to receive in your change after a cash transaction? To solve this problem, your script must calculate the number of coins required to form all 100 cent amounts in the range [00,01,02,...,98,99] and then compute the average. We'll assume that all quantities of change are equally likely and that the denominations available are: = 25 = 10 Quarter Dime Nickel Penny = - = Additionally, we'll assume that all the individual amounts are formed using the min- imum number of coins. I.e. 58 cents require 2 quarters, 1 nickel, and 3 pennies for total of 6 coins. (a) Report the average number of coins using the exact formatting shown below: Average Number of Coins = 0.00 where 0.00 will be replaced with your answer formatted using '%.2f' (b) How does the average number of coins change if we imagine eliminating pen- nies from circulation? This would require rounding all prices to the nearest nickel; that is, we'll now only consider forming cent amounts in the range [00,05,10,...90,95). Can you come up with a simple mathematical argument or intuitive explanation to check your answer? (c) Assuming we decide to leave the pennies alone, can you reduce the average number of coins by modifying any/all of the other three denominations? For example, if a dime was worth 11 cents and a quarter was worth 27 cents, would the average number of coins be decreased when compared with your answer to Part(a)? We'll assume that the values of the penny remains fixed at 1, and that we return to forming am unts in the familiar range [00, 01 02,...,98,99]. As you experiment, keep in mind that the conventional logic for counting back change requires that a given coin does not exceed half the denomination above it; e.g. 0.5 x Quarter > Dime, 0.5 ~ Dime > Nickel, etc. Try different values and report your optimal monetary system. Are there any disadvantages to your new system

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!