Commit 8a9c437e by BellCodeEditor

save project

parent 2c49ffce
Showing with 59 additions and 2 deletions
......@@ -8,4 +8,62 @@ for i in range(5):
pen.left(144)
pen.end_fill()
turtle.done()
"""
\ No newline at end of file
"""
list=["石头","剪刀","布"]
player=input("出拳")
print("玩家出"+player)
computer=random.choice(list)
print(computer)
for player in list:#如果玩家输入的是石头剪刀布中的一个:
if player == computer:
print("平局")
elif (player=="石头" and computer=="布")or(player=="布" and computer=="剪刀")or(player=="剪刀" and computer=="石头") :
print("你输了,小lj")
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