Commit 09c1f1e7 by BellCodeEditor

save project

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