Exact change Python / How to Tutorial

preview_player
Показать описание
Exact change Python

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:

0
the output is:

No change
Ex: If the input is:

45
the output is:

1 Quarter
2 Dimes
Рекомендации по теме
Комментарии
Автор

Thanks for this. I had no idea where to even begin besides getting the input.

ActualZombeard
Автор

You made this so simple and easy to follow, and I learned a lot.

Please keep sharing. zybooks kicks my butt at times.

Thank you!

JonesyDivine
Автор

Thank you so much for this! This is by far the easiest way to do this that I have found

crilz
Автор

Thank you. Learned a lot. I'm really looking forward to watching more of your videos.

wardrakephoenix
Автор

You're Eric and I'm Billy after they both play an instrument in Billy Madison

tomf.
Автор

This is what one of my labs are. There are so many different ways ive seen it done
Also by using the if and elif signs.. this video helped me get started. If you input the amount of money as a float and then do num_cents *100 would that convert it into an integer? Thank you!

imdalyn
Автор

When I put in a number that ends with a five (i.e 95) I keep getting one nickel. How do I fix this?

jeromewortham