题解 | #判断直线相交#
判断直线相交
http://www.nowcoder.com/practice/1efe2386491f4235b78a34cd1b5fb3d0
# -*- coding:utf-8 -*-
class CrossLine:
def checkCrossLine(self, s1, s2, y1, y2):
# write code here
if s1 == s2 and y1 == y2: # 直线重合
return True
elif s1 != s2: # 直线相交
return True
else: # 直线平行
return False
