I was having connection issues

Hi all,

So I wrote the following list comprehension to convert the items in celsius to fahrenheit. The conversion worked fine but the new list prints in the console four times. Why is this and how do I fix it please!

celsius = [0, 10, 15, 32, -5, 27, 3]
fahrenheit = [temp * 9/5 + 32 for temp in celsius]


Can you show us a screenshot of both your code and the result?

All I got from your code is the list,

[32.0, 50.0, 59.0, 89.6, 23.0, 80.6, 37.4]

I’ve just run it again and it now only prints once. I was having intermittent connection issues with the sight earlier so I imagine it’s something to do with that.

Thanks anyway!

1 Like