(Compute the perimeter of a triangle) Write a program that reads three edges for a triangle and computes the perimeter if the input is valid. Otherwise, display that the input is invalid. The input is valid if the sum of every pair of two edges is greater than the remaining edge. Here is a sample run:
Enter three edges: 1, 1, 1
The perimeter is 3
Enter three edges: 1, 3, 1
The input is invalid
#4.19.Perimeter of a triangle.
#Prompt the user to enter the edges of a triangle
a, b, c = eval(input("Enter the three egdes of a triangle:"))
perimeter = a + b + c
if a + b > c:
print("The perimeter is ",perimeter)
elif a + c > b:
print("The perimeter is ",perimeter)
elif b + c > a:
print("The perimeter is ",perimeter)
else:
print("Your input is invalid.")