Advertisement
furas

corrections

Jun 26th, 2018
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. def collinear(x1, y1, x2, y2, x3, y3): # <-- third point
  2.     m = 0
  3.  
  4.     a = x2 - x1
  5.     b = y2 - y1
  6.  
  7.     if a != 0:
  8.        m = b/a # <-- instead of a/b
  9.        print(m) # <-- instead of return m
  10.  
  11.     if (y3 - y2)*(x2 - x1) == (y2 - y1)*(x3 - x2):
  12.        print("True")
  13.     else:
  14.        print("False")
  15.  
  16.     #return m
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement