A bug in the python course

bug in python course

Python >10. A Day at the Supermarket>8.Keeping Track of the Produce

though this code is correct,it throws an error.because of a bug.

the bug is ,
when we print value of orange price =1.5 and use %.2f. to print it … it throws an error

I also mentioned the bug here in forum,

Note:I reported this bug to codecademy support team,they will resolve it soon!


Ashutosh Barot

Your output doesn’t match the described format, there are a couple of differences.

And also, it expects the default string conversion for floats (%s)

if it expects %s ,then change all the values to integer,(orange=15 in prices)
and then try with %d

it won’t give an error ,while using %d ,to print the results

using %2f to print a float value should not be considered as an error…that’s the bug