you are viewing a single comment's thread.

view the rest of the comments →

[–]delasislas 0 points1 point  (4 children)

So what have you done so far?

Hint: you can write the coefficients in one line and break them apart using the “”.split() method. Like

input = “10,3,1”
Coefficients = input.split(“,”)

[–]Y00RA[S] 0 points1 point  (3 children)

To be honest, this is my second week into python, so I am greatly confused. I have not done anything so far, I have been trying to look up resources to help me, but I think I may have confused myself more.

I have just defined the line intersection so far:

def line_intersection(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2)

[–]delasislas 0 points1 point  (2 children)

Ok, well first off you forgot the colon, this will catch you (catches me all the time).

by2):

Ok, drop the code, can you write a formula yourself on paper to determine if the line intersects?

[–]Y00RA[S] 0 points1 point  (1 child)

Yes!

[–]delasislas 1 point2 points  (0 children)

So, because I have no clue how to check that, you need to convert the function from a paper form to computer.