Commit 734af127 by BellCodeEditor

save project

parent 23dfff73
Showing with 16 additions and 0 deletions
# 玩家出拳
import random
jin=["石头","剪刀","布"]
while True:
sad = input("石头/剪刀/布:")
print("玩家出拳" + sad)
hello = random.choice(jin)
print(hello)
if sad == hello:
print("平局")
else:
if (sad == "石头" and hello =="剪刀") or (sad == "剪刀" and hello == "布") or (sad == "布" and hello == "石头"):
print("win")
else:
print("lose")
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