This issue is related to the if and other logical operators

Screen Link: <!-- Enhttps://app.dataquest.io/c/57/m/313/conditional-statements/7/combining-logical-operators->

My Code: <!–opened_file = open(‘AppleStore.csv’)
from csv import reader
read_file = reader(opened_file)
apps_data = list(read_file)

nonfree_games_social_ratings=
for row in apps_data[1:]:
rating = float(row[7])
genre = row[11]
price = float(row[4])

if (genre == 'social Networking' or genre == 'Games') and price != 0 :
    nonfree_games_social_ratings.apend(rating)

avg_non_free = sum(nonfree_games_social_ratings) / len(nonfree_games_social_ratings)Enclose →

Replace this line with your code

What I expected to happen: average rating for nonfree_apps

What actually happened: Traceback (most recent call last):
File “/tmp/a53ce1f7aa0d1013ef1a0a34b7e1ddf74511c3bc.py”, line 86, in run_code_string
exec(code, variables)
File “”, line 13, in
AttributeError: ‘list’ object has no attribute ‘apend’

Replace this line with the output/error
```Traceback (most recent call last):
  File "/tmp/a53ce1f7aa0d1013ef1a0a34b7e1ddf74511c3bc.py", line 86, in run_code_string
    exec(code, variables)
  File "<string>", line 13, in <module>
AttributeError: 'list' object has no attribute 'apend'

<!--Enter other details below: -->

Hi @owusupat3,

Welcome to the Community!

You have a typo to be fixed: it should be append and not apend.

1 Like