Commit 19dffb61 by BellCodeEditor

save project

parent 220fe62b
Showing with 15 additions and 0 deletions
import random
list=["石头","剪刀","布"]
jisuanji=random.choice(list)
dongxi=input("玩家出拳:剪刀/石头/布")
print("玩家出拳:"+dongxi)
print("计算机出拳:"+jisuanji)
if dongxi==jisuanji:
print("平局了")
elif (dongxi=="剪刀" and jisuanji=="布") or (dongxi=="石头" and jisuanji=="剪刀") or (dongxi=="石头" and jisuanji=="剪刀"):
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