Loading...
Loading...
Loading...
Three side lengths make a triangle only when the sum of any two sides is greater than the third side.
Given three sides, print Not a triangle if they cannot form one. Otherwise print Equilateral (all sides equal), Isosceles (exactly two equal) or Scalene (all different).
Not a triangle, Equilateral, Isosceles, Scalene.Example 1
Input
3 4 5
Output
Scalene
Example 2
Input
2 2 2
Output
Equilateral
Try the problem first. Open one hint at a time.
Check the triangle rule first, for all three pairs of sides.
Then check all three equal, then any two equal. Scalene is what is left.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor