Commit f8501be2 by BellCodeEditor

save project

parent affb4aad
Showing with 11 additions and 10 deletions
......@@ -6,16 +6,17 @@ print("玩家出拳:"+p)
list=["石头","剪刀","布"]
compurter=random.choice(list)
print("计算机出的是:"+compurter)
if p==compurter:
print("平局")
elif p=="石头"and compurter=="剪刀":
print("恭喜玩家赢")
elif p =="剪刀" and compurter=="布":
print("恭喜玩家赢")
elif p =="布" and compurter=="石头":
print("恭喜玩家赢")
else:
print("恭喜电脑赢")
if p in list:
if p==compurter:
print("平局")
elif p=="石头"and compurter=="剪刀":
print("恭喜玩家赢")
elif p =="剪刀" and compurter=="布":
print("恭喜玩家赢")
elif p =="布" and compurter=="石头":
print("恭喜玩家赢")
else:
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