id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

bryce.hulett@hotmail.com > make_change
prev  |  next  |  chance

Write a program that takes a dollar amount and converts it to quarters, dimes and pennies. Use as many quarters first, followed by dimes, nickels, then pennies. Invoking make_change(5.33) would return a string "21 quarter(s), 0 dime(s), 1 nickel(s) and 3 penny(ies)".


make_change(5.33) → '21 quarter(s), 0 dime(s), 1 nickel(s) and 3 penny(ies)'
make_change(0.19) → '0 quarter(s), 1 dime(s), 1 nickel(s) and 4 penny(ies)'
make_change(0.0) → '0 quarter(s), 0 dime(s), 0 nickel(s) and 0 penny(ies)'

...Save, Compile, Run (ctrl-enter)

def make_change(amount):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 200 Post-solution available

Copyright Nick Parlante 2017 - privacy