Commit 3b3a4827 by BellCodeEditor

save project

parent e5f1198a
Showing with 16 additions and 4 deletions
import random
# 玩家出拳
player=input("请输入石头剪刀布:")
P=input("请输入石头剪刀布:")
list=["石头","剪刀","布"]
Cq=random.choice(list)
print(Cq)
c=random.choice(list)
print(c)
\ No newline at end of file
if P in list:
if P == Cq:
print("平局")
elif (P=="石头" and Cq=="剪刀"):
print("你赢了")
elif (P=="剪刀" and Cq=="布"):
print("你赢了")
elif (P=="布" and Cq=="石头"):
print("你赢了")
else:
print("你输了")
else
\ 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