Screen Link:
My 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])
# Complete code from here
if price == 0.0:
apps_data.append("free")
else:
apps_data.append("not free")
apps_data[0].append('free_or_not') # column added
print(apps_data[:6])```
What I expected to happen:
I expected it to the output to be exactky as mentioned in the solution . Basically ,
What actually happened:
The solution says that apps_data is longer than we expected . Upon checking the solution , I noticed that after writing the if statement , i had added apps_data.append(“free”) line to be executed whereas the solution states that I have to add app.append(‘free’) . My question is why ?? Why did my statement not work here because ideally , after the If condition is satisfied , the app_data list should be appended and NOT app
<!--Enter other details below: -->