Hi,on the puzzle MIME Type, all test are ok but when I submit, I only get 91% and it says :
“The following validators differ from the puzzle test cases to prevent
hard coded solutions. This is why you can have some fails here even if
all of the tests provided in the IDE have been successfully passed.”
But how can I resolve my puzzle without any test ? And there is not hardcode at all…
If the extension for a given file can be found in the association table (case insensitive, e.g. TXT is treated the same way as txt) then print the corresponding MIME type.
if(fExtension.lower() in extentions):
type = extentions[fExtension.lower()]
elif(fExtension.upper() in extentions):
type = extentions[fExtension.upper()]