Assignment 8 — multi-input problem solving
Due Time: Friday, February 19
Program break_the_bank.py
- With a single prompt, it gets from the user four blank-separated values in the following order: number of quarters, dimes, nickels, and pennies. Computes and displays how much the coinage is worth.
- To avoid runs like the following, you are required to make me use of built-in function round() to convert the calculated worth of the piggy bank to two decimal places.
- Two possible testing runs
Number of quarters, dimes, nickels, and pennies: 27 14 28 18
Coinage
27 quarters
14 dimes
28 nickels
18 pennies
are worth 9.73 dollars
Number of quarters, dimes, nickels, and pennies: 1 2 3 4
Coinage
1 quarters
2 dimes
3 nickels
4 pennies
are worth 0.64 dollars
🦆 © 2022 Jim Cohoon | Resources from previous semesters are available. |