Commit ac69dde0 by BellCodeEditor

auto save

parent 5689a1b8
Showing with 14 additions and 1 deletions
...@@ -3,4 +3,14 @@ print("玩家出拳:"+player) ...@@ -3,4 +3,14 @@ print("玩家出拳:"+player)
import random import random
a=["石头","剪刀","布"] a=["石头","剪刀","布"]
compurter=random.choice(a) compurter=random.choice(a)
print("计算机输出的结果是:"+compurter)
if player==compurter:
print("平局")
elif player=="石头"and compurter=="剪刀":
print("玩家赢")
elif player=="剪刀"and compurter=="布":
print("玩家赢")
elif player=="布"and compurter=="石头":
print("玩家赢")
else:
print("jis计算机赢")
\ 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