Dimes Python

Vending machines on campus sell lots of goodies for nominal fees. Assume that all snacks cost
between 25 cents and 1 dollar, and prices are always multiples of 5.
A user can only buy 1 item at a time, and the machine only accepts a single dollar bill for each
transaction. You need to determine the correct change to be dispensed.
You’ll need to prompt the buyer for the price of their item and then determine their change in
terms of # of quarters, # of dimes and # of nickels.
Very few people prefer to get all nickels as their change, so be sure to always calculate
quarters, then dimes, then nickels.
You should also make sure that your output is grammatically correct, such that if only 1 nickel is
owed, then you output nickel rather than nickels.
This program is meant to test your understanding of input statements, output statements, if-else
statements, functions, and mathematical calculations.

×
New Download