Last active
July 10, 2020 07:37
-
-
Save itspacchu/a26e729aae87d73bdbdc2dff3f096cab to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# %% | |
import numpy as np | |
# %% | |
p,q=list(),list() | |
p0,p1,q0,q1 = list(map(int,input('').split(' '))) | |
p.append(p0);p.append(p1);q.append(q0);q.append(q1) | |
i = int(input()) | |
arealist = [] | |
for _ in range(i): | |
current_xy = list(map(float,input('').split(' '))) | |
arealist.append(np.linalg.det(np.array(((p[0],p[1],1),(q[0],q[1],1),(current_xy[0],current_xy[1],1))))) | |
if(sum(arealist)==0): | |
print('They\'re collinear') | |
else: | |
print('Nope they aint') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment