10. The elif Clause - not getting the "Nice Work" message/completed mission

My Code:

INITIAL CODE

opened_file = open(‘AppleStore.csv’)
from csv import reader
read_file = reader(opened_file)
apps_data = list(read_file)

for app in apps_data[1:]:
price = float(app[4])
if price == 0:
app.append(“free”)
elif price > 0 and price <20:
app.append(“affordable”)
elif price <=20 and price >= 50:
app.append(“expensive”)
elif price >= 50:
app.append(“very expensive”)

apps_data[0].append(“price_label”)
print(apps_data[:6])

What I expected to happen: The result matches the solution. I expected to get a Nice Work message and move on to the next exercise

What actually happened: WHen I click on submit, no “ding” sounds and although I can complete the course. It appears in my dashboard as if it was not fully completed.

Any ideas why this happens?

Thanks

ALbert

Hi @a_diaz_esteve,

Welcome to the Community!

Could you please share also the link to the mission screen where you have this issue? Thank you!

Hello Elena,

Here is the link:

https://app.dataquest.io/m/313/conditional-statements/10/the-elif-clause

Thanks!

SOLVED.

The problem was with a couple “less than”, “greater than” symbols. I have highlighted them in bold. This caused a number of values to not appear on my list.