Commit 5f67101e by BellCodeEditor

save project

parent f67859f2
Showing with 22 additions and 18 deletions
import random import turtle
list=["剪刀""石头""布"] screen=turtle.Screen()
letter=random.choice)(list) screen.bgcolor("light blue")
print(letter) len=screen.textinput("100","100")
if player in list: len=int(len)
if player==computer: pen=turtle.Pen()
print("平局") pen.write("你好\n",font=("Times",30,"normal"))
elif player=="石头"and computer=="布" pen.hideturtle()
print("恭喜,你赢了") len=60
elif player=="剪刀"and computer=="布" pen.penup()
print("恭喜,你赢了") pen.goto(100,100)
elif player=="布"and computer=="石头" pen.pendown()
print("恭喜,你赢了") pen.pensize(5)
else: pen.pencolor("red")
print("很遗憾,你输了") pen.left(45)
else: pen.forward(2*len)
print("很遗憾,你输了") pen.circle(len,180)
\ No newline at end of file pen.right(90)
pen.circle(len,180)
pen.forward(2*len)
turtle.done()
\ 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