Commit 1cd5e27e by BellCodeEditor

save project

parent e17d66c0
Showing with 14 additions and 5 deletions
import random# 玩家出拳
player=input("请玩家出拳(拳头/剪刀/布):")
print("玩家出:"+player)
a=input("请玩家出拳(拳头/剪刀/布):")
print("玩家出:"+a)
list=["拳头","剪刀","布"]
computer=random.choice(list)
print("电脑出:"+computer)
\ No newline at end of file
b=random.choice(list)
print("电脑出:"+b)
if a==b:
print("平局")
elif (a=="剪刀" and b=="布") or (a=="布" and b=="拳头") or (a=="拳头" and b=="剪刀"):
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