python9课——2

海龟画图

#PythonDraw.py
import turtle as t
t.setup(650, 350, 200, 200)
t.penup()
t.fd(-100)
t.pendown()
t.pensize(1)
t.pencolor("purple")
t.seth(-90)
t.circle(100)

t.penup()
t.goto(-50,0)
t.pendown()
t.circle(50,180)

t.penup()
t.goto(10,40)
t.pendown()
t.circle(-20,180)

t.penup()
t.goto(-10,40)
t.pendown()
t.circle(-20,-180)

t.penup()
t.goto(0,0)
t.seth(-90)
t.pendown()

t.done()

猜你喜欢

转载自www.cnblogs.com/linfeng-up/p/11863349.html