''' Purpose: determine the worth of a piggy bank Problem statement: Prompt user respectively for four values: a number of quarters, dimes, nickels, and pennies. Then compute and display how much the indicated coins are worth. Checker(s): ''' # get input, split it, and cast to int reply = input( 'Enter number of quarters, dimes, nickels, and pennies: ' ) q, d, n, p = reply.split() q, d, n, p = int( q ), int( d ), int( n ), int( p ) # compute worth worth = ( 0.25 * q ) + ( 0.10 * d ) + ( 0.05 * n ) + ( 0.01 * p ) # display interested info print( 'Coinage' ) print( ' ', q, 'quarters' ) print( ' ', d, 'dimes' ) print( ' ', n, 'nickels' ) print( ' ', p, 'pennies' ) print( 'are worth', worth, 'dollars' )