小工具知识网

当前位置: 首页 > 行业知识 > python头歌实践教学平台-python第三章作业(初级)

行业知识

python头歌实践教学平台-python第三章作业(初级)

2026-11-27 04:55:17 来源:互联网转载

���1关 判断是否直角三角形

()
a=eval(input())b=eval(input())c=eval(input())shortest=min(a,b,c)longest=max(a,b,c)middle=sum([a,b,c])-shortest-longestif shortestb and b+c>a:    s=(a+b+c)/2    area=(s*(s-a)*(s-b)*(s-c))**0.50    print('YES')    print(f'{area:.2f}')else:    print('NO')

第4关 身高测算

father_h=int(input())mother_h=int(input())child=input()if child=="男":    child_h=(father_h+mother_h)*1.08/2    print(int(child_h))elif child=="女":    child_h=((father_h*0.923)+mother_h)/2    print(int(child_h))else:     print(f'无对应公式')

第5关 个税计算器

n=eval(input())x=0if n

上一篇:阿里云服务器怎样租

下一篇:魔兽世界服务器怎么赚钱?