当前第2页 返回上一页
太阳花
1 2 3 4 5 6 7 8 | import turtle as timport time
t.color( "red" , "yellow" )
t.speed(10)
t.begin_fill() for _ in range(50):
t.forward(200)
t.left(170)
end_fill()
time.sleep(1)
|
绘制五角星
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | import turtleimport time
turtle.pensize(5)
turtle.pencolor( "yellow" )
turtle.fillcolor( "red" )
turtle.begin_fill() for _ in range(5):
turtle.forward(200)
turtle.right(144)
turtle.end_fill()
time.sleep(2)
turtle.penup()
turtle. goto (-150,-120)
turtle.color( "violet" )
turtle.write( "Done" , font=( 'Arial' , 40, 'normal' ))
time.sleep(1)
|
更多Python相关技术文章,请访问Python教程栏目进行学习!
以上就是python怎么安装turtle的详细内容,更多文章请关注木庄网络博客!!
返回前面的内容
相关阅读 >>
【插入排序实现】Python
Python中如何将sqlite导出后转成excel(xls)表的示例详解
Python如何生成随机密码?
Python能做什么工作吗
Python中new类方法和init 实例方法以及单例模式的介绍(附示例)
怎么用Python画圆
Python可以用来干什么?
使用Python通过win32 com打开excel并添加sheet的方法
Python安装的第三方库怎么删除
如何离开/退出/停用Python的virtualenv
更多相关阅读请进入《Python》频道 >>
人民邮电出版社
python入门书籍,非常畅销,超高好评,python官方公认好书。
转载请注明出处:木庄网络博客 » python怎么安装turtle