Commit 09c1f1e7 by BellCodeEditor

save project

parent 1166a936
Showing with 14 additions and 9 deletions
cca = input("玩家请出拳") while True:
print("玩家出拳:"+cca) cca = input("玩家请出拳")
import random print("玩家出拳:"+cca)
list=["剪刀","石头","布"] import random
ccb = random.choice(list) list=["剪刀","石头","布"]
print(ccb) ccb = random.choice(list)
if cca == ccb: print(ccb)
if cca in list:
if cca == ccb:
print("平局") print("平局")
elif cca=="石头" and ccb=="剪刀" or cca=="剪刀" and ccb=="布" or cca=="布" and ccb=="石头": elif cca=="石头" and ccb=="剪刀" or cca=="剪刀" and ccb=="布" or cca=="布" and ccb=="石头":
print("恭喜你,你赢了") print("恭喜你,你赢了")
else: else:
print("很遗憾,你输了") 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