Commit d87ce7a8 by BellCodeEditor

auto save

parent 3d681cba
Showing with 18 additions and 11 deletions
import turtle import random
list=["剪刀","石头","布"]
pen=turtle.Pen() player=input("请输入石头,剪刀,布:")
pen.shape("turtle") computer=random.choice(list)
pen.fillcolor("green") print("玩家出拳"+player)
for i in range(5): print("电脑出拳"+computer)
pen.forward(200) if player in list:
pen.right(144) if player==computer:
pen.hideturtle() print("q")
turtle.done()- elif player=="剪刀" and computer=="布":
\ No newline at end of file print("w")
elif player=="布" and computer=="石头":
print("w")
elif player=="石头" and computer=="剪刀":
print("w")
else:
print("e")
\ 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