First guided project 8/14

Screen Link:

My Code:

free_android = []
free_ios = []

for app in android_english:
    price = app[7]
    if price == '0':
        free_android.append(app)
  
for app in ios_english:
    price = app[4]
    if price == '0.0':
        free_ios.append(app)

print(len(free_android))
print(len(free_ios))

What I expected to happen:
My question is, why do we write ‘0’ in the if condition of android and ‘0.0’ in the if condition of ios? Also why can’t we convert these prices into float value?

What actually happened:

Replace this line with the output/error

Because of how the data is stored in each dataset. In the android data the price for free apps is represented as "0". Whereas in the ios data the price for free apps is represented as "0.0".

You can, if you’d like to. Any subsequent analysis or checks you might have to make would, of course, be on float values and not strings.