python画笔控制函数:1.turtle.penup()函数,抬起画笔;2.turtle.pendown()函数,落下画笔;3.turtle.pensize(width)函数,画笔的宽度;4.turtle.pencolor(color)函数,颜色字符串或rgb值;
python中的画笔控制函数有以下几种
1.penup()
turtle.penup()函数的作用是抬起画笔,且不留下痕迹,其别名为turtle.pu();
2.pendown()
turtle.pendown()函数的作用是落下画笔,且不留下痕迹,其别名为turtle.pd();
3.pensize()
turtle.pensize(width)函数表示的是画笔的宽度,其别名为turtle.width(width);
4.pencolor()
turtle.pencolor(color)函数为颜色字符串或rgb值;
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读:Python中format()函数的格式控制技巧有哪些