(Solved) : Need Answer Python Work Done Think Issue Code Total Variable Think Need Others Don T Know Q34284588 . . .

I need the answer to this is python. I have some work done, butI think the issue with my code is the “total” variable. I think Ineed some others, but I don’t know. Please include the final codethat works. The program I submit it in adds it’s own input andchecks it with results, so there’s no need to ask for any inputfrom the user. In other words, there is no need for “What’s theinput?” statements.

4.15 LAB: Exact change Write a program with total change amount as an integer input, and output the change using the fewest coins, one coin type per line. The coin types are dollars, quarters, dimes, nickels, and pennies. Use singular and plural coin names as appropriate, like 1 penny vs. 2 pennies Ex: If the input is O or less, output: no change Ex: If the input is 45, the output is 1 quarter 2 dimes LAB ACTTY 4.15.1: LAB: Exact change 0 10 main.py Load default template... 1 def main: total int(input() if total0 print(no change dollars total/ 100 total 100 quarters = total // 25 total %-25 dimes-total// 10 total %-10 nickels-total// 5 total %-5 pennies = total if dollars 1 10 12 13 14 15 16 17 18 19 20 21 print(%d dollars % dollars) elif dollars 1 print( %d dollar % dollars) if quarters 1 print(%d quarters, % quarters) elif quarters1: 23 24 25 26 27 78 print(%d quarter, % quarters) if dimes 1: print(%d elif dimes1: nrint(%d dimes. % dimes) dime % dimes)

4.15 LAB: Exact change Write a program with total change amount as an integer input, and output the change using the fewest coins, one coin type per line. The coin types are dollars, quarters, dimes, nickels, and pennies. Use singular and plural coin names as appropriate, like 1 penny vs. 2 pennies Ex: If the input is O or less, output: no change Ex: If the input is 45, the output is 1 quarter 2 dimes LAB ACTTY 4.15.1: LAB: Exact change 0 10 main.py Load default template… 1 def main: total int(input() if total0 print(‘no change’ dollars total/ 100 total 100 quarters = total // 25 total %-25 dimes-total// 10 total %-10 nickels-total// 5 total %-5 pennies = total if dollars 1 10 12 13 14 15 16 17 18 19 20 21 print(‘%d dollars’ % dollars) elif dollars 1 print( ‘%d dollar’ % dollars) if quarters 1 print(‘%d quarters, % quarters) elif quarters1: 23 24 25 26 27 78 print(‘%d quarter, % quarters) if dimes 1: print(‘%d elif dimes1: nrint(‘%d dimes. % dimes) dime’ % dimes) Show transcribed image text

Expert Answer


Attached