Commit 8bc5cdbf by BellCodeEditor

save project

parent 99b9fbcc
Showing with 12 additions and 8 deletions
......@@ -4,13 +4,16 @@ print("玩家出拳:"+player)
printlist=["1","2","3"]
robot=random.choice(list)
print("robot:"+robot)
if player==robot:
print("平局")
elif player=="石头"and robot=="2":
print("win")
elif player=="剪刀"and robot=="3":
print("win")
elif player=="布"and robot=="1":
print("win")
if player in list:
if player==robot:
print("平局")
elif player=="石头"and robot=="2":
print("win")
elif player=="剪刀"and robot=="3":
print("win")
elif player=="布"and robot=="1":
print("win")
else:
print("lose")
else:
print("lose")
\ 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