18th Dec 2022, 12:35 AM
Roberto Pereira
3 Respuestas
+ 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.
18th Dec 2022, 2:15 AM
Mozzy
Mozzy - avatar
+ 1
Pls add the task description in the question description
18th Dec 2022, 1:55 AM
Emerson Prado
Emerson Prado - avatar
0
Thanks Mozzy. I can solve it
19th Dec 2022, 1:43 PM
Roberto Pereira