Commit 7b096672 by BellCodeEditor

save project

parent f3448e75
Showing with 14 additions and 4 deletions
import random
player=input("请出拳:石头/剪刀/布")# 玩家出拳
print("玩家出拳:"+player)
import random
computer=["石头","剪刀","布"]
print("计算机出拳:"+player)
\ No newline at end of file
list=["石头","剪刀","布"]
compoter=random.choice(list)
print("计算机出拳:"+compoter)
if compoter==player:
print("平局")
else:
if (computer=="石头"and player=="布")or(computer=="剪刀"and player=="石头")or(computer=="布"and player=="剪刀"):
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