用户:我是黄琪TyrI查看:0 回复:1 评论:0 创建时间:2020-08-08T17:21:50
【作品展示】

【作品介绍】
大家好
【作品源代码】
import random
t = 60
c = 0
j = 0
while 1:
if t <= 0:
print("小金鱼饿喵了┏┛墓┗┓...(((m-__-)m")
break
if t <= 30:
print("小金鱼饿了")
elif t <= 60:
print("小金鱼充满活力")
elif t <= 100:
print("小金鱼吃撑了")
else:
print("小金鱼撑喵了┏┛墓┗┓...(((m-__-)m")
break
print("当前饥饿度:", t)
print("当前金币", j)
print("你想要小金鱼干什么(eat/lay/game):")
ing=input()
if (ing in 'eat') and (j >= 5):
j -= 5
t += 15
print("好吃,吧唧吧唧")
elif ing in 'lay':
t -= 20
c += 1
print("产卵中。。。")
elif ing in 'game 1':
print("玩游戏了!")
t -= 10
x = random.randint(3, 6)
y = random.randint(2, 4)
print(x, "^", y, '=')
z = int(input())
if z == x**y:
print("太棒了!")
j += 20
else:
print("错了呢,正确答案是",x**y)
elif ing in 'game 2':
print("更新中")
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn