title: Change Calculator with exact type of change given
body: <p>the instructions are </p>
  
  <blockquote>
    <p>Create a program that allows him to input a certain amount of change,
    and then print how how many quarters, dimes, nickels, and pennies are
    needed to make up the amount needed. For example, if he inputs 1.47,
    the program will tell that he needs 5 quarters, 2 dimes, 0 nickels,
    and 2 pennies.</p>
  </blockquote>
  
  <p>I didn't really know how to do this but I gave it a shot. I'm really unsure of what to do. </p>
  
  <pre><code>print "Change Calclator"
  
  quarter = .25
  dime = .10
  nickel = .5
  penny = .1
  
  moneygiven = raw_input("Enter how much money given: ")
  citem = raw_input("How much did the item cost?: ")
  moneygiven = float(moneygiven)
  citem = float(citem)
  moneyback = moneygiven - citem
  
  qmb = moneyback % quarter
  partialtotal = moneyback - qmb * quarter 
  dmb = partialtotal / dime
  dpartialtotal = partialtotal - dmb * dime
  nmb = dpartialtotal / nickel
  npartialtotal = dpartialtotal - nmb * nickel
  pmb = npartialtotal / penny
  ppartialtotal = npartialtotal - pmb * penny
  
  print "You need %s quarters, %s dimes, %s nickels, %s pennies." % (qmb, dmb, nmb, pmb)
  </code></pre>
  
  <p>when run with 20 in moneygiven and 19.45 in citem it gives this</p>
  
  <pre><code>Change Calclator
  Enter how much money given: 20
  How much did the item cost?: 19.45
  You need 2.2 quarters, 0.0 dimes, 0.0 nickels, 0.0 pennies.
  </code></pre>