This commit is contained in:
10_2 2024-07-17 10:04:45 +08:00
parent 9ae1329cdf
commit eee0927ce9
2 changed files with 55 additions and 0 deletions

11
2024.7.17.1.py Normal file
View File

@ -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()#画圆

44
2024.7.17.py Normal file
View File

@ -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()