Commit 0ea86a9f by BellCodeEditor

save project

parent 39c0f34d
Showing with 14 additions and 5 deletions
import random
play = input("请出拳","石头","剪刀","布")
print("玩家出拳:+play)
play = input("请玩家出拳:(石头/剪刀/布)")
print("玩家出拳:"+play)
list=["石头","剪刀",""]
col = random.choice(list)
print("电脑出拳:"+col)
list = ["石头","剪刀","布"]
comput = random.choice(list)
print("电脑出拳:"+comput)
if play == comput
print("平局")
elif play == "石头" and comput == "剪刀"
print("你赢了")
else:
print ("你输了")
elif play == "布" and comput == "石头"
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