Commit 510e9b0a by BellCodeEditor

save project

parent b1544272
Showing with 13 additions and 9 deletions
......@@ -5,13 +5,16 @@ import random
list=["石头","剪刀","布"]
b=random.choice(list)
print("电脑:"+b)
if b==play:
print("平局")
elif b=="剪刀"and play=="石头"
print("赢了")
elif b=="石头"and play=="布"
print("赢了")
elif b=="布"and play=="剪刀"
print("赢了")
if play in list:
if b==play:
print("平局")
elif b=="剪刀"and play=="石头"
print("赢了")
elif b=="石头"and play=="布"
print("赢了")
elif b=="布"and play=="剪刀"
print("赢了")
else:
print("输了")
else:
print("输了")
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