导入海龟库:import turtle as t(可以写import turtle----写import turtle开头写turtle)
画图:t.circle(半径) 直径=半径*2
设置填充颜色:t.fillcolor("颜色单词")
开始填充:t.begin_fill()
画图
结束填充
灰色:Gray 橙色:Orange黄色:yellowh黑色:black
圆:round 方形 spuare 三角形:triangular
示例1
#绘制一个圆
import turtle
turtle.circle(100)
turtle.circle(50)
turtle.circle(200)
示例2
#绘制一个蓝色填充的圆
import turtle
turtle.fillcolor("blue")
turtle.begin_fill()
turtle.circle(100)
turtle.end_fill()
示例3
import turtle
turtle.fillcolor("red")
turtle.begin_fill()
turtle.circle(60)
turtle.end_fill()
turtle.fillcolor("yellow")
turtle.begin_fill()
turtle.circle(30)
turtle.end_fill()