
-----------------------------------
ylcc23
Tue Mar 29, 2016 10:29 pm

Don't know how to do this, looking for where to start
-----------------------------------
Write a program that makes change for amounts less than one dollar. Input to the program should be a positive integer less than 100, representing an amount of money, in cents. Outputs should be the original amount of money together with a set of coins (quarters, dimes, nickels, cents) that could make up that amount. The program should produce change containing the minimum number of coins required for the given amount. The output should be in a natural, non-stilted form. For example, input of 58 should produce output something like

58 cents: 2 quarters, 1 nickel, and 3 cents.

Rather than

58 cents: 2 quarters, 0 dimes, 1 nickels, 3 cents.

I have a tiny bit so far, but I can't figure out what to do for the rest of it.

amount = int(input("Input an integer between 1 and 99: "))

-----------------------------------
Insectoid
Wed Mar 30, 2016 5:17 pm

RE:Don\'t know how to do this, looking for where to start
-----------------------------------
The div keyword will divide two integers without the remainder or decimal points. So 5 div 2 = 2. 

The mod keyword will return the remainder of a division, so 5 mod 2 = 1. 

Can you think of a way to use these keywords to complete this assignment?

-----------------------------------
Srlancelot39
Wed Jul 19, 2017 8:27 am

RE:Don\'t know how to do this, looking for where to start
-----------------------------------
The process is a lot like converting decimal to binary... :)
