Skip to content
C

Triangle Type Classifier

Mediumpython

Given the three side lengths of a triangle, classify it as Equilateral, Isosceles, or Scalene.

  • Equilateral — all three sides equal.
  • Isosceles — exactly two sides equal.
  • Scalene — all three sides different.

Approach: read all three sides on one line, then use if-elif-else to check all-equal first, then any-pair-equal, then default to Scalene.

Input: One line: three side lengths separated by spaces.

Output: One line: Equilateral Triangle, Isosceles Triangle, or Scalene Triangle.

Input (stdin)

Output

Run your code to see output here...