用户:PTS_AlbusPotter_抽风蛇崽查看:0 回复:1 评论:0 创建时间:2020-03-16T17:11:29
【作品展示】

【作品介绍】
养鱼的朋友们,福利来了!此计算器专用于孔雀鱼,喜欢的朋友们点个赞再走吧!
【作品源代码】
def midu1():
a = int(input('鱼缸长'))
b = int(input('鱼缸宽'))
c = int(input('水面高度'))
d = int(input('鱼只数量'))
e =a * b * c // d
if (e > 900):
print("密度为{},非常小,可以再多养几条~".format(e))
elif (e <= 900 and e > 700):
print("密度为{},非常好,不用再换大鱼缸了~".format(e))
elif (e <= 700 and e >= 400):
print("密度为{},很不错,注意不要再添鱼了哦~".format(e))
else:
print("密度为{},不行啦!快为鱼儿准备大缸吧!".format(e))
def midu2():
a = int(input('鱼缸长'))
b = int(input('鱼缸宽'))
c = int(input('水面高度'))
d = int(input('鱼只数量'))
e = a * b * c // d
if (e > 800):
print("密度为{},非常小,可以再多养几条~".format(e))
elif (e <= 800 and e > 600):
print("密度为{},非常好,不用再换大鱼缸了~".format(e))
elif (e <= 600 and e >= 350):
print("密度为{},很不错,注意不要再添鱼了哦~".format(e))
else:
print("密度为{},不行啦!快为鱼儿准备大缸吧!".format(e))
def daxiao():
h=int(input('鱼只数量'))
i=int(input('鱼只长度'))
g=h*i*600
print("买容积{}立方厘米的缸合适".format(g))
g=input('计算养鱼密度合不合适还是根据鱼只数量计算缸大小(回答密度或大小)')
if '密度'in(g):
f = input('鱼缸有过滤吗(请回答有或没有)')
if ('有' in f):
midu2()
elif ('没' in f):
midu1()
else:
print('格式错误')
elif '大小'in(g):
daxiao()
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn