Commit 33c3f903 by BellCodeEditor

save project

parent b553faca
Showing with 11 additions and 4 deletions
inport random import random
player=input("你要出什么拳(石头/剪刀/布):") player=input("你要出什么拳(石头/剪刀/布):")
print("玩家出的拳是:"+player) print("玩家出的拳是:"+player)
gamelist=["石头"] list=["石头","剪刀","布"]
# 玩家出拳 computer=random.choice(list)
\ No newline at end of file print("电脑出拳:"+computer)
if player==computer:
print("平局")
elif (computer=="拳头" and player=="布")or (computer=="布" and player=="剪刀")or (computer=="剪刀" and player=="拳头"
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