#Change.PY # A program to calculate the value of change def main(): print("Change Counter") print() print("Enter count of each coin type.") quarters = eval(input("Quarters: ")) dimes = eval(input("Dimes: ")) nickels = eval(input("Nickels: ")) pennies = eval(input("Pennies: ")) Quarters2 = quarters * .25 print() print("Quarters: ", Quarters2) Dimes2 = dimes * .10 print() print("Dimes: ", Dimes2) Nickels2 = nickels * .05 print() print("Nickels: ", Nickels2) Pennies2 = pennies * .01 print() print("Pennies: ", Pennies2) total = Quarters2 + Dimes2 + Nickels2 + Pennies2 print() print("The total value of your change is", total) main()It creates the prompt for the amount of change input as requested
it calculates the value of each coin
and it processes the total
however, the math is wrong.
it seems the nickels are not being calculated correctly and i can not figure out how
any help would be fantastic.