Write a program to check if a triangle can be formed given the lengths of its sides (a, b, c) entered by the user.
Example 1:
Input: (3, 4, 5)
Output: True
Example 2:
Input: (1, 1, 3)
Output: False
A triangle can be formed if the sum of the lengths of any two sides is greater than the length of the third side.
def is_triangle(sides):
a, b, c = sides
if (a + b > c) and (a + c > b) and (b + c > a):
return True
else:
return False
NOTEOwing to browser caching, any code input into the Trinket IDE might carry over across page refreshes or when transitioning between different questions. To commence with a clean slate, either click on the 'Reset Button' found within the IDE's Hamburger icon (☰) menu or resort to using Chrome's Incognito Mode.