用户:
胖虎Fatiger查看:0 回复:0 评论:0 创建时间:2023-08-17T19:43:24
【作品展示】

【作品介绍】
这是我以前的作品,挖出来给像我一样的新手借鉴一下,也请大佬们给些建议(´・ᴗ・`)
【作品源代码】
import random
player = float(input("请输入石头:1,剪刀:2,布:3"))
computer = random.randint(0,2)
if ((player == 1) and (computer == 2)) or ((player == 2) and (computer == 3)) or ((player == 3) and (computer == 1)):
print("喵,你战胜了电脑,获胜了!")
if (player == computer):
print("平局")
else:
print("哈哈,你输啦!!!再来一局吧。")
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn