goto(x,y)
circle( r )
penup()
pendown()
foward(distance)
left(angle)
goto(x,y)
circle( r )
penup()
pendown()
foward(distance)
left(angle)
import turtle turtle.showturtle() #显示箭头 turtle.write("fuzhuoming") #写字符串 turtle.forward(300)#前进300 turtle.color("red") #画笔颜色变红 turtle.left(90) turtle.forward(300) turtle.goto(0,50) turtle.goto(0,0) turtle.penup()#抬笔 turtle.goto(0,300) turtle.pendown() turtle.goto(0,50) turtle.goto(50,50) turtle.circle(100)
图形化设计
1.turtle
showturtle--箭头
.write
.forward
.color
.left
.goto
.penup/down
.circle