Commit 1c8cdf39 by BellCodeEditor

save project

parent e8480fc1
Showing with 8 additions and 1 deletions
# 玩家出拳 # 玩家出拳
name=input("请出拳:石头/剪刀/布:") name=input("请出拳:石头/剪刀/布:")
print("我出:"+name) print("我出:"+name)
list=["石头""剪刀","布"] list=["石头","剪刀","布"]
computer=random.choile(list) computer=random.choile(list)
print("电脑出:"+computer) print("电脑出:"+computer)
if name==computer:
print("平局")
elif (name=="石头" and computer=="剪刀") or (name=="剪刀" and computer=="布") or (name=="布" and computer=="石头")
print("玩家赢")
else:
print("计算机赢")
\ 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