Commit 4f60dcae by BellCodeEditor

save project

parent e4b5931c
Showing with 13 additions and 6 deletions
import turtle import turtle
import random
screen=turtle.Screen() screen=turtle.Screen()
screen.bgcolor("green") screen.bgcolor("green")
pen1=turtle.Pen() pen1=turtle.Pen()
pen1.write("你好,\n再见",font=("Times",100,"normal")) pen1.write("你好,\n再见",font=("Times",100,"normal"))
pen1.hideturtle() pen1.hideturtle()
pen=turtle.Pen() pen=turtle.Pen()
pen.up()
pen.left(180)
pen.forward(200)
pen.left(180)
pen.down()
pen.pensize(10) pen.pensize(10)
piggy=[10,20,30,40,50,60,70,80,90,100]
pig=random.choice(piggy)
pen.pencolor("red") pen.pencolor("red")
pen.left(45) pen.left(45)
pen.forward(10+90-20*2*2+80) pen.forward(2*pig)
pen.right(180) pen.circle(pig,180)
pen.circle(100,180) pen.right(90)
pen.right(180) pen.circle(pig,180)
pen.circle(100,180) pen.forward(2*pig)
pen.forward(100)
pen.hideturtle() pen.hideturtle()
turtle.done() turtle.done()
......
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