Commit d5d35c7e by BellCodeEditor

save project

parent 323b2ac2
Showing with 7 additions and 3 deletions
......@@ -4,10 +4,13 @@ import random
list=["石头","剪刀","布"]
computer=random.choice(list)
print(computer)
if plyer==computer:
if plyer in list:
if plyer==computer:
print("平局")
elif (plyer=="石头"and plyer=="剪刀")or(plyer=="布"and plyer=="剪刀")or(plyer=="石头"and plyer=="布")
elif (plyer=="石头"and plyer=="剪刀")or(plyer=="布"and plyer=="剪刀")or(plyer=="石头"and plyer=="布")
print("恭喜,你赢了")
else:
else:
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