Check if a triangle of positive area is possible with the given angles in python

 21 - Feb - 2022
 XpertPhp
 25

In this article, We will explain to you how to check if a triangle of positive area is possible with the given angles in python. so you can see our python example. Example

def isTriangleExists(a, b, c):
    if(a != 0 and b != 0 and c != 0 and (a + b + c)== 180):
        if((a + b)>= c or (b + c)>= a or (a + c)>= b):
            return "YES"
        else:
            return "NO"
    else:
        return "NO"
a, b, c = 50, 60, 70
 
print(isTriangleExists(50, 60, 70))
Output
YES