Commit 03dcac3c by BellCodeEditor

save project

parent ac338460
Showing with 5 additions and 4 deletions
......@@ -3,11 +3,12 @@ player=input("玩家请出拳")
print("玩家出拳是:"+player)
# 电脑出拳
# 导入random模块
list=["剪刀""石头""剪刀""布"]#创建list列表,储存,剪刀,石头,布
list=["剪刀","石头","布"]#创建list列表,储存,剪刀,石头,布
#设置电脑出拳 使用computer变量 和 random.choice()方法
# 输入"电脑出拳是: "
if plarer==compter:
player("平局")
elif ( plarer=="石头" and compter=="剪刀") or (plarer=="剪刀" and compter=="布")
elif ( plarer=="石头" and compter=="剪刀") or (plarer=="剪刀" and compter=="布") or (plarer=="石头" and compter=="剪刀"):
player("玩家赢")
elifplayer("电脑赢")
\ No newline at end of file
else:
player("电脑赢")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment