Question: need help! python language Define a function called exact change that takes the todal change arnount in cents and calculates the change using the fewest

need help! python language  need help! python language Define a function called exact change that
takes the todal change arnount in cents and calculates the change using
the fewest coins. The coin types are pennies, nickels, dimes, and quarters.
Then write a main program that reads the total change amount as
an inteque irput. calis exact change0, and outputs the change, one coin

Define a function called exact change that takes the todal change arnount in cents and calculates the change using the fewest coins. The coin types are pennies, nickels, dimes, and quarters. Then write a main program that reads the total change amount as an inteque irput. calis exact change0, and outputs the change, one coin type per Ine. Use singular and plural coin names as appropriate, like 1 penny vi. 2 pennies. Output 'no change' if the input is 0 or less. Ex: if the input is: (or less), the output is: no change Ex: If the input is: 45 the output is: 2 dimes 1 quarter Your program must define and call the following function. The function exact change0) should return num. pennies, num. nickeks. num,dimes, and num quarters def exact_change(user_tota1) Your program must define and call the following function. The function exact change0 should return num.pennies, numi, nickels, num_dimes, and num quarters: def exact_change(user_total) main.py Load defaut template. main.py When done developing your program, press the Submit for gi Input Your output 2:Compare output Input Your output 3:Compare output Input 4.Unit test exact_change(300), Should return 0,0,0,12 exact change (300) incorrectly returned 7um-pernites: 12 Your output num_nickola: 0 nim dimets: 0 numiquasterst 0 5.Unit test exact changef(141). Should retum 1,1,1,5 exact_ohange (1.41) incorrectly roturnerd num pennieas 5 Your outpot num_nickela: 1 . num dimes: 1 num -quat tera: 1

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!