python函数判断三角形

def test01(a, b, c):
    if a + b > c and a + c > b and b + c > a:
        print("可以构成三角形")
    else:
        print('不能构成三角形')


a = int(input('请输入边长'))
b = int(input('请输入边长'))
c = int(input('请输入边长'))
test01(a, b, c)

你可能感兴趣的:(python)