Commit 6b249112 by BellCodeEditor

save project

parent 836cba06
Showing with 63 additions and 0 deletions
import turtle
pen=turtle.Pen()
pen.pencolor("black")
pen.penup()
pen.goto(-100,-100)
pen.pendown()
for i in range(4):
pen.forward(200)
pen.left(90)
pen.fillcolor("red")
pen.begin_fill()
pen.penup()
pen.goto(0,0)
pen.pendown()
pen.circle(10)
pen.end_fill()
pen.begin_fill()
pen.penup()
pen.goto(-50,0)
pen.pendown()
pen.circle(10)
pen.end_fill()
pen.begin_fill()
pen.penup()
pen.goto(50,0)
pen.pendown()
pen.circle(10)
pen.end_fill()
pen.hideturtle()
# a=6#长方形的边
# b=3#长方形的宽
# s=2*a+2*b#长方形的面积
# print("长方形的周长为",s)#a=长方形的边,b=长方形的长,a×b=s,也就是长方形的面积
import turtle
pen=turtle.Pen()
pen.speed(0)
pen.penup()
pen.goto(0,-200)
pen.pendown()
pen.circle(200)
pen.fillcolor("blue")
pen.begin_fill()
pen.penup()
pen.goto(-100,50)
pen.pendown()
pen.circle(20)
pen.end_fill()
pen.begin_fill()
pen.penup()
pen.goto(100,50)
pen.pendown()
pen.circle(20)
pen.end_fill()
pen.penup()
pen.goto(0,50)
pen.pendown()
pen.circle(-50,360,3)
pen.penup()
pen.goto(-150,-70)
pen.pendown()
pen.goto(0,-170)
pen.goto(150,-70)
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