Commit f8501be2 by BellCodeEditor

save project

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