Commit f8501be2 by BellCodeEditor

save project

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