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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started