Screen Link: Learn data science with Python and R projects
opened_file = open(‘AppleStore.csv’)
from csv import reader
read_file = reader(opened_file)
apps_data = list(read_file)
for row in apps_data[1:]:
price = float(row)
rating = float(row)
if price > 9: n_apps_more_9.append(rating)
avg_rating = sum(n_apps_more_9) / len(n_apps_more_9)
if price <= 9:
What I expected to happen:
What actually happened:
- n_apps_less_9 is a list, but we expected it to be a int.
- n_apps_more_9 is a list, but we expected it to be a int.
anything wrong if i name n_apps_less_9/ n_apps_more_9 as a list?