Commit 28f75042 by BellCodeEditor

save project

parent 40b3c6f2
Showing with 8 additions and 0 deletions
...@@ -4,3 +4,10 @@ print("玩家出拳"+lll) ...@@ -4,3 +4,10 @@ print("玩家出拳"+lll)
k=["石头","剪刀","布"] k=["石头","剪刀","布"]
letter=random.choice(k) letter=random.choice(k)
print("计算机出拳"+letter) print("计算机出拳"+letter)
if lll==letter:
print("平局")
elif lll=="剪刀" and letter=="布" or lll=="布" and letter=="石头" or lll=="石头" and letter=="剪刀":
print("玩家赢")
else:
print("计算机赢")
\ 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