Commit cf069969 by BellCodeEditor

save project

parent 220fe62b
Showing with 39 additions and 0 deletions
import random
# 玩家出拳
a = input("你出啥?石/剪/布:")
while not (a in ["石","剪","布"]):
a = input("你出啥?石/剪/布:")
print("玩家出的是----" +a )
#电脑出拳
d = random.choice(["石","剪","布"])
print("电脑出的是----" +d )
if a =="布":
if d =="布":
print("平局!")
elif d == "剪":
print("输了!")
elif d =="石":
print("赢了!")
if a =="剪":
if d =="布":
print("赢了!")
elif d == "剪":
print("平局!")
elif d =="石":
print("输了!")
if a =="石":
if d =="布":
print("输了!")
elif d == "剪":
print("赢了!")
elif d =="石":
print("平局!")
input()
\ 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