Question: piggyBank ( 2 5 points ) Implement a function piggyBank that represents a piggy bank and determines its value. Details: accepts a single argument, a

piggyBank (25 points)
Implement a function piggyBank that represents a piggy bank and determines its value. Details:
accepts a single argument, a list of coins.
'Q','D','N','P' are the valid values for coins and represent quarter, dime, nickel and
penny, respectively. Each should be valued at their standard US value in whole cents.
(Assume they will be supplied in upper case.)
any other value, for example the the Canadian Quarter 'CQ', should be accepted, but
should not add to the value of the bank
the value of the bank should be returned in whole cents
piggyBank ( 2 5 points ) Implement a function

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 Finance Questions!