Commit 81ee3499 by BellCodeEditor

save project

parent c26ec6d0
Showing with 8 additions and 4 deletions
......@@ -5,10 +5,14 @@ print("你出了:"+p)
import random
w=["石头","剪刀","布"]
q=random.choice(w)
print("计算机出了:"+q)
if p==q:
if p in w:
print("计算机出了:"+q)
if p==q:
print("平局")
elif (p=="剪刀" and q=="布") or (p=="布" and q=="石头") or (p=="石头" and q=="剪刀"):
elif (p=="剪刀" and q=="布") or (p=="布" and q=="石头") or (p=="石头" and q=="剪刀"):
print("你赢了")
else:
else:
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