Python program to Check for Existence of a Triangle

print("Insert length of proposed triangle: ") x = float(input("x = ")) y = float(input("y = ")) z = float(input("z = ")) if x+y>z and x+z>y and y+z>x: print("The triangle of xyz exist") else: print("The triangle does not exist")

 

 

Output:

Insert length of proposed triangle:
x = 1
y = 2
z = 3
The triangle does not exist

 

Insert length of proposed triangle:
x = 25
y = 36
z = 42
The triangle of xyz exist

 

Insert length of proposed triangle:
x = 5
y = 6
z = 7
The triangle of xyz exist