python基础(计算三角形的面积和周长)

import math a=int(input(“请输入第一条边”)) b=int(input(“请输入第二条边”)) c=int(input(“请输入第三条边”)) p=(a+b+c)/2 g=math.sqrt(p*(p-a)(p-b)(p-c)) if a+b>c and b+c>a and c+a>b: print(“三角形的周长:”+str(a+b+c)) print(“三角形的面积:”
相关文章
相关标签/搜索