+ 1
Can't solve test 4 for Super Sale
3 Réponses
+ 2
Roberto Pereira
Your code seems to be making incorrect comparisons when finding `expensive` value, since the values in `prices` list are still strings, not numbers. If you want to find the most expensive value (largest number), need to convert to numbers first. Add this after first line:
prices = [float(x) for x in prices]
Now you can also remove the `float()` conversion in the other lines, since the values are now numbers.
Strangely enough, only 1 of the 7 tests captures this sneaky logical error. Hope this was helpful.
+ 1
Pls add the task description in the question description
0
Thanks Mozzy. I can solve it