猫史档案馆


【Python作品分享】简单的游戏【作业帖】

用户:懂事的狂电猴abFV懂事的狂电猴abFV查看:0 回复:1 评论:0 创建时间:2019-11-09T21:13:05


【作品展示】

center_image

 

【作品介绍】

我随便做的

 

【作品源代码】

# p2-1.po
"""---第一个小游戏---"""
temp = input("不妨猜一下我冰晓龙心里想的数:")
guess = int(temp)
if guess == 25:
    print("喵!这你都能猜中")
    print("哼,猜中也没奖励")
else:
    print("猜错啦")
print("好了,不玩啦")

 

【提示】

部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:

https://python.codemao.cn


回复

上一页1 页 / 共 1下一页
QBZ_QBZ_

import random

# p2-1.po
"""---第一个小游戏---"""
c = random.randint(1,100)
temp = input("不妨猜一下我冰晓龙心里想的数:")
guess = int(temp)
if guess == c:
    print("喵!这你都能猜中")
    print("哼,猜中也没奖励")
else:
    print("猜错啦")
print("好了,不玩啦")
 

点赞0


评论