I need help on why this is happening:
I'm currently doing the cash problem. I used get_float to get user's amount and then used round(amount_from_user * 100) to convert the float to int (i.e cent) as per the problem spec.
Here's the problem If user enters a float e.g 0.02 the program round off the value and then execute a loop to count how many times each coin is given to the user (in this ex. program will print out the value 2 (no of coin cust. is given). [AS EXPECTED]
But If user enters an int e.g 2 or 2.0 or 2 00, etc INSTEAD of a float,, the program will do value_in_int (e.g 2.00) * 100 = 200 and then starts counting the no of times each coin is given to Cust. Which will equal 8 and not 2 [NOT EXPECTED RESULT]