Python 官方文档:入门教程 => 点击学习
print "Welcome to run" print "Please input num" print "1 stand for 矩形" print "2 stand for 圆" print "
print "Welcome to run"
print "Please input num"
print "1 stand for 矩形"
print "2 stand for 圆"
print "3 stand for 正方形"
s=int(input("Please input U num:"))
if s == 1:
print "input 长度:"
print "input 宽度:"
a=int(input("长度:"))
b=int(input("宽度:"))
x=a*b
print x
elif s == 3:
print "input 正方形边长"
v=int(input("边长:"))
z=v*v
print v
elif s == 2:
print "input 值:"
c=int(input("半径:"))
d=c*c*3.14
print d
else:
print "OH no! Please input 1-3"
--结束END--
本文标题: Python 数值计算
本文链接: https://www.lsjlt.com/news/185110.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0