Question: Define a function called calcChange which takes a float parameter amount and returns a list of the number of dollars, quarters, dimes, nickels and pennies
Define a function called calcChange which takes a float parameter amount and returns a list of the number of dollars, quarters, dimes, nickels and pennies the amount converts into. The list returned should contain the number of dollars, the number of quarters, the number of dimes, the number of nickels and the number of pennies in that order. Create a flowchart for the function. Create a program called testCalcChange to test the function. A sample execution should look as follows: testCalcChange() Enter amount in dollars: 2.37 The function returned the following list: [2,1,1,0,2]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
