Demo entry 6329521



Submitted by anonymous on Nov 30, 2016 at 08:20
Language: Python. Code size: 252 Bytes.

def classify_triangle(a, b, c):
  a, b, c = sorted([a, b, c])
  if not (a + b) > c:
    return 'notvalid'
  if a == b == c:
    return 'equilateral'
  elif (a == b) or (b == c) or (a == c):
    return 'isoceles'
    return 'scalene'

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).