10-2
This commit is contained in:
parent
9ae1329cdf
commit
eee0927ce9
|
@ -0,0 +1,11 @@
|
|||
import turtle #将turtle函数启动
|
||||
turtle.forward()#前进
|
||||
turtle.backward#后退
|
||||
turtle.Turtle()#将turtle的功能赋值给XXX
|
||||
turtle.done()#结束绘制并将画面停留
|
||||
turtle.penup()#抬笔
|
||||
turtle.pendown()#落笔
|
||||
turtle.begin_fill()#开始填充
|
||||
turtle.fillcolor()#填充颜色
|
||||
turtle.end_fill()#结束填充
|
||||
turtle.circle()#画圆
|
|
@ -0,0 +1,44 @@
|
|||
import turtle
|
||||
t=turtle.Turtle()
|
||||
t.begin_fill()
|
||||
t.color('blue')
|
||||
t.circle(100)
|
||||
t.filling()
|
||||
t.end_fill()
|
||||
t.begin_fill()
|
||||
t.color('white')
|
||||
t.circle(80)
|
||||
t.filling()
|
||||
t.end_fill()
|
||||
t.penup()
|
||||
t.goto(0,90)
|
||||
t.pendown()
|
||||
t.begin_fill()
|
||||
t.color('red')
|
||||
t.circle(15)
|
||||
t.filling()
|
||||
t.end_fill()
|
||||
t.pencolor('black')
|
||||
t.right(90)
|
||||
t.forward(60)
|
||||
t.penup()
|
||||
t.backward(125)
|
||||
t.pendown()
|
||||
t.begin_fill()
|
||||
t.circle(15)
|
||||
t.fillcolor('white')
|
||||
t.filling()
|
||||
t.end_fill()
|
||||
t.penup()
|
||||
t.left(90)
|
||||
t.forward(2)
|
||||
t.right(90)
|
||||
t.pendown()
|
||||
t.begin_fill()
|
||||
t.circle(8)
|
||||
t.fillcolor('black')
|
||||
t.end_fill()
|
||||
t.begin_fill()
|
||||
t.circle(5)
|
||||
|
||||
turtle.done()
|
Loading…
Reference in New Issue