distance = 0.4 # km gps_points_recorded = 100 class Distances(): def average_gps_points_per_km (self, gps_points_recorded, distance): answer = gps_points_recorded / int(distance) return answer dis = Distances() result = dis.average_gps_points_per_km (gps_points_recorded, distance) print(result)