Computer Science, asked by shaikandshaik11428, 6 hours ago

write a python program:

It takes the three inputs from
user which are the 3 sides of a triangle and give the output
whether the triangle with
given sides 'exist or not'​

Answers

Answered by rajdeo8052
0

Answer:

See below is a small python program

Explanation:

a = int(input("Enter the first side of Triangle :"))

b = int(input("Enter the second side of Triangle :"))

c = int(input("Enter the third side of Triangle :"))

def exist_or_not(side1, side2, side3):

 

   # check condition

   if (a + b <= c) or (a + c <= b) or (b + c <= a) :

       return "Triangle Exists for given sides"

   else:

       return "Triangle Does not exists for given sides"  

print("\n", exist_or_not(a,b,c))

Attachments:
Similar questions