基本信息
文件名称:Python程序设计基础 课件 2.6 引用.pptx
文件大小:363.32 KB
总页数:3 页
更新时间:2025-09-29
总字数:约小于1千字
文档摘要

2.6库的引用扩充Python程序功能的方式-使用import保留字完成,采用a.b编码风格import库名 库名.函数名(函数参数)importturtleturtle.setup(600,400,300,300)turtle.penup()turtle.fd(-250)turtle.pendown()turtle.pensize(25)turtle.pencolor(red)turtle.seth(-40)foriinrange(4):

turtle.circle(40,80)

turtle.circle(-40,80)turtle.circle(4