I am working on a change calculator that accepts five arguments(dollars, quarters, dimes, nickels, pennies) and calculates the total amount of change. When I put change.py in the command line followed by 1 1 1 1 1 I am supposed to get 1.41 as the total but I am getting 1.4100000000000001 instead.When I put in other numbers it works as it should. Can anyone help with this? Thank you!
enter code here
import sys
def change(dollars,quarters,dimes,nickels,pennies):
dollars = int(float(dollars))
quarters = int(float(quarters))
dimes = int(float(dimes))
nickels = int(float(nickels))
pennies = int(float(pennies))
total = (dollars * 1.00) + (quarters * .25) + (dimes *.10) + (nickels * .05) + (pennies * .01)
return total
round(total)
dollars = sys.argv[1]
quarters = sys.argv[2]
dimes = sys.argv[3]
nickels = sys.argv[4]
pennies = sys.argv[5]
total = change(dollars,quarters,dimes,nickels,pennies)
print('The total value of your change is ',(total))