Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Help with the last part of the first lecture.

I have followed the lecture but found myself very confused with this piece of code, if someone can explain it to me I would be very grateful, remember I am just a beginner.

def point_maker(x, y):
return x, y

a = point_maker(0, 10)
b = point_maker(5,3)

def calculate_slope(point_a, point_b):
return (point_b[1] - point_a[1])/(point_b[0] - point_a[0])
print "The slope between a and b is {0}".format(calculate_slope(a, b))

(The output)

The slope between point a and b is -2.