Write a python function to Check whether triangle is valid or not if three points are given


Topic: Write a python function to Check whether triangle is valid or not if three points are given

Solution

def checkTriangle(x1, y1, x2, y2, x3, y3): 
    a = (x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) 
    if a == 0: 
        return False 
    else: 
        return True
		
		



List all Python Programs