W3School TIY Editor

  • W3School 在线教程
  • 改变方向
  • 暗黑模式
​x
 
# 导入数学库
import math
​
# 设置对边和邻边长度
parendicular = 10
base = 5
​
# 计算并输出直角三角形的斜边长度
print(math.hypot(parendicular, base))