Screen Link:
My Code:
INITIAL CODE
2
opened_file = open(‘AppleStore.csv’)
3
from csv import reader
4
read_file = reader(opened_file)
5
apps_data = list(read_file)
6
7
for app in apps_data[1:]:
8
price = float(app[4])
9
# Complete code from here
10
if price == 0:
11
app.append(‘free’)
12
elif price >= 0 and < 20:
13
app.append(‘affordable’)
14
elif price >= 20 and < 50:
15
app.append(‘affordable’)
16
elif price >= 50:
17
app.append(‘very expensive’)
18
apps_data[0].append(‘price_label’)
19
20
print(apps_data[:6])
21
Output
File “”, line 12
elif price >= 0 and < 20:
^
SyntaxError: invalid syntax
Replace this line with your code
What I expected to happen:
What actually happened:
Replace this line with the output/error