Commit 01180cf9 by BellCodeEditor

save project

parent b63b72cd
Showing with 8 additions and 2 deletions
player = input("出拳:(石头/剪刀/布):") player = input("出拳:(石头/剪刀/布):")
print("出拳:"+player) print("出拳:"+player)
list = ["石头""剪刀""布"] list = ["石头""剪刀""布"]
cp = random. cp = random.choice(list)
\ No newline at end of file print("电脑出拳:"+cp)
if player==cp:
print("平局")
elif player=="石头" and cp=="剪刀" or player=="剪刀" and cp=="布" or
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