79816894

Date: 2025-11-11 16:33:37
Score: 1.5
Natty:
Report link

In python for loop, you should be aware that the function inside should be indented or else the for loop wont run

for lat,lon in zip(df['latitude'],df['longitude']): # go through two columns at once
        school_location.append([lat,lon])
        for schools in school_location:
                distance_apart = (distance.distance(your_location ,schools)).miles
                Distance.append(distance_apart)

This would fix the looping function the next problem would be the variable name distance_apart as your function name is also distance_apart this can shadows the function name and make it confusing.

Hope this helps and please give the error message next time

Reasons:
  • Whitelisted phrase (-1): Hope this helps
  • RegEx Blacklisted phrase (2.5): please give
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Jovinto Ferdinand Kusniawan