Commit 7afb1c28 by BellCodeEditor

save project

parent de19778f
Showing with 7 additions and 3 deletions
......@@ -5,24 +5,27 @@ import random
list1=["石头","剪刀","布"]
computer=random.choice(list1)
print("计算机出",computer)
if player=="石头":
if player in list1:
if player=="石头":
if computer=="石头":
print("平局")
elif computer=="剪刀":
print("玩家赢")
elif computer=="布":
print("计算机赢")
if player=="剪刀":
if player=="剪刀":
if computer=="石头":
print("计算机赢")
elif computer=="剪刀":
print("平局")
elif computer=="布":
print("玩家赢")
if player=="布":
if player=="布":
if computer=="石头":
print("玩家赢")
elif computer=="剪刀":
print("计算机赢")
elif computer=="布":
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