Python
判断三边是否为三角形的代码
收起
当前问题酬金
¥ 0 (可追加 ¥500)
支付方式
扫码支付
支付金额 15 元
提供问题酬金的用户不参与问题酬金结算和分配
支付即为同意 《付费问题酬金结算规则》
def is_triangle(a=0, b=0, c=0): #abc 三条边长 A = [a,b,c] A.sort() #升序排序 if A[2] < A[1] +A[0]: print("{} is triangle".format(A)) else: print("不构成三角") is_triangle(11,20,30); #[11, 20, 30] is triangle
报告相同问题?