Commit 41665894 by BellCodeEditor

save project

parent be178836
Showing with 12 additions and 9 deletions
......@@ -4,15 +4,18 @@ import random
abc=["剪刀","石头","布"]
com=random.choice(abc)
print("计算机出拳:"+com)
if player==com:
print("平局")
elif player=="石头" and com=="剪刀":
print("恭喜您!您赢了!")
elif player=="剪刀" and com=="布":
print("恭喜您!您赢了!")
elif player=="布" and com=="石头":
print("恭喜您!您赢了!")
if player in abc :
if player==com:
print("平局")
elif player=="石头" and com=="剪刀":
print("恭喜您!您赢了!")
elif player=="剪刀" and com=="布":
print("恭喜您!您赢了!")
elif player=="布" and com=="石头":
print("恭喜您!您赢了!")
else :
print("很遗憾,您输了。")
else :
print("很遗憾,您输了。")
print("输入错误!")
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