首先先下载安装好python程序。
相关推荐:《python视频》
1.在我们自己的电脑上找到python 的IDLE工具。
2.然后打开IDLE,新建一个文件,命名为test1.py。
3.接着我们就开始导入turtle库,然后编辑代码。from turtle import *penup()goto(0,-200)pendown()circle(200)penup()goto(-100,50)pendown()begin_fill()circle(17.5)end_fill()penup()goto(100,50)pendown()begin_fill()circle(17.5)end_fill()penup()goto(0,50)pendown()circle(-70,steps=3)penup()goto(-150,-70)pendown()right(15)goto(0,-170)goto(150,-70)hideturtle()
4.F5运行代码,查看效果图。
以上就是用python绘制笑脸的基本步骤的详细内容,更多请关注龙方网络其它相关文章!