Commit 35ba138d by BellCodeEditor

save project

parent 05ee5d85
Showing with 15 additions and 2 deletions
import random
# 玩家出拳 # 玩家出拳
plyr=input("请出拳:") plyr=input("请出拳:")
print("玩家出拳:"+plyr) print("玩家出拳:"+plyr)
\ No newline at end of file #电脑出拳
list=["石头","剪刀","布"]
com=random.choice(list)
print("电脑出"+com)
if plyr in list:
if piyr==com:
print("平局")
elif (plyr=="石头" and com=="剪刀")or(plyr=="布" and com=="石头")or(plyr=="剪刀" and com=="布"):
print("玩家赢")
else:
print("电脑赢")
else:
print("输入错误")
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