Question: 
Write a python function to find the slope of a line.


Model's Code:
def slope(x1, y1, x2, y2):
    return (y2 - y1) / (x2 - x1) if x2 != x1 else float('inf')



Sample Correct Code:
def slope(x1,y1,x2,y2): 
    return (float)(y2-y1)/(x2-x1)  


Asserts:
assert slope(4,2,2,5) == -1.5
assert slope(2,4,4,6) == 1
assert slope(1,2,4,2) == 0


Tests:
Test 1 of 3: PASS
Test 2 of 3: PASS
Test 3 of 3: PASS

Test 835 of 974: 641/835 (76.76646706586826%): success