Johnny5b's picture
download
raw
660 Bytes
import time
from enum import Enum
class TriangleType(Enum):
INVALID, EQUALATERAL, ISOCELES, SCALENE = 0, 1, 2, 3
def delay():
time.sleep(0.01)
def classify_triangle(a, b, c):
delay()
# Sort the sides so that a <= b <= c
if a > b:
tmp = a
a = b
b = tmp
if a > c:
tmp = a
a = c
c = tmp
if b > c:
tmp = b
b = c
c = tmp
if a + b <= c:
return TriangleType.INVALID
elif a == b and b == c:
return TriangleType.EQUALATERAL
elif a == b or b == c:
return TriangleType.ISOCELES
else:
return TriangleType.SCALENE

Xet Storage Details

Size:
660 Bytes
·
Xet hash:
c7c5bd6e8fbd19e84beb404e9b8c5d5a0b96c04a0f0ce0b9eb6ba1077ff17f1d

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.