Commit d87ce7a8 by BellCodeEditor

auto save

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