Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
podłoga i sufit solution in Clear category for The Angles of a Triangle by Fokzterrier
from math import degrees, acos, ceil, floor
def checkio(a, b, c):
if a = 1/2:
x = ceil(x)
else:
x = floor(x)
if y - floor(y) >= 1/2:
y= ceil(y)
else:
y = floor(y)
w = 180 - x - y
print(x,"x")
print(y,'y')
print(w,'w')
if x > y:
if x>w:
if y>w:
return[w, y, x]
else:
return[y,w,x]
else:
return [y,x,w]
elif y>x:
if y>w:
if x>w:
return [w, x, y]
else:
return [x, w, y]
else:
return [x,y,w]
else:
return [0, 0, 0]
#These "asserts" using only for self-checking and not necessary for auto-testing
if __name__ == '__main__':
#assert checkio(4, 4, 4) == [60, 60, 60], "All sides are equal"
#assert checkio(3, 4, 5) == [37, 53, 90], "Egyptian triangle"
assert checkio(11, 20, 30) == [0, 0, 0], "It's can not be a triangle"
Nov. 12, 2016