[Tutor] Python 3.5 Question

Sasuke Uchiha sasuke510ca at gmail.com
Fri Oct 9 02:13:44 CEST 2015


Hi, I would like to know how to create a code similar to the result below.
I want to input a number like 1000, and for it to give me the maximum
output with the least amount of bills (such as 100s)

   -

   The bill amounts you have are 100s, 50s, 20s, 10s, 5s, and 1s
   -

   >>>
   Please enter the amount of money you wish to withdraw: 1737 You received:
   17 hundreds.
   0 fifties.
   1 twenties.
   1 tens.
   1 fives.
   2 ones.
   >>>
   Please enter the amount of money you wish to withdraw: 168 You received:
   1 hundreds.
   1 fifties.
   0 twenties.
   1 tens.
   1 fives.
   3 ones.


More information about the Tutor mailing list