Python小课100节-颜色填充
教学内容:
导入绘图库
轮廓颜色,填充颜色命令
学习比较长的代码,根据输出调整代码
代码按功能分块
源代码
import turtle
turtle.pensize(4)
turtle.pencolor("purple")
turtle.fillcolor("blue")
turtle.begin_fill()
turtle.circle(50)
turtle.end_fill()
turtle.circle(80)
turtle.begin_fill()
turtle.circle(-50)
turtle.end_fill()
turtle.circle(-80)
评论