Commit 5a421727 by BellCodeEditor

save project

parent 82e1b64a
Showing with 10 additions and 3 deletions
# 玩家出拳
a=input("你出(石头·剪刀·布)") w=input("你出(石头·剪刀·布)")
input("玩家出拳:"+a) input("玩家出拳:"+w)
import random import random
list=["石头","剪刀","布"] list=["石头","剪刀","布"]
c=random.choice(list) c=random.choice(list)
print("计算机玩家出拳:"+c) print("计算机玩家出拳:"+c)
if w==c:
print("平局")
elif w=="剪刀" and c=="布" or w=="布" and c=="石头" or w=="石头" and c=="剪刀":
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