首先先下载安装好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运行代码,查看效果图。
本文地址:http://itbyc.com/Python/21538.html
转载请注明出处。