Commit 57593e4a by BellCodeEditor

save project

parent 220fe62b
Showing with 12 additions and 0 deletions
import random
name=input("玩家请出拳(剪刀,石头,布)")
new_list=["剪刀","石头","布"]
suijishu=random.choice(new_list)
print("计算机出拳:"+suijishu)
print("玩家出拳:"+name)
if name==new_list:
print("平局")
elif (new_list=="石头" and name=="剪刀") or (new_list=="剪刀" and name=="布") or (new_list=="布" and name=="石头"):
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