Python第1期第7次课(立体的海龟螺旋线).pptxVIP

Python第1期第7次课(立体的海龟螺旋线).pptx

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  4. 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  5. 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  6. 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  7. 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多

Python第七课-立体海龟螺旋线

撰写老师:

目录

CONTENTS

00.课前回顾

00

课前回顾

Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryourtext.

课前回顾---颜料盒

1.颜料盒的定义

2.颜料盒的使用

ylh=(‘blue’,‘green’,‘red’)

fromturtleimportant*

ylh=(blue,green,red)

forcinrange(3):

t.pencolor(ylh[c%3])

01

学习目标

Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryourtext.

1.了解循环中计数器的变化

学习目标:

2.学习如何运用计数器

3.变化粗细

4.变化直线的长度和粗细

02

知识点讲解及演示

Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryourtext.

1.1了解循环中计数器的变化

循环

inrange

for

在范围内

计数器

c

(4)

范围

计数器c的变化范围

从0到3,也就是c第一次循环是0

第二次循环c是1

第三次循环c是2

第四次循环c是3

这里的4是,小于4的意思,范围并不包括4本身

1.2运用计数器

fromturtleimport*

forcinrange(5):

circle(c)

在循环中把计数器放进去会怎么样?

c的值第一次为0,circle(c)

相当于circle(0),半径为0画圆

c的值第二次为1,circle(c)

相当于circle(1),半径为1画圆

c的值第三次为2,circle(c)

相当于circle(2),半径为2画圆

c的值第四次为3,circle(c)

相当于circle(3),半径为3画圆

c的值第五次为4,circle(c)

相当于circle(4),半径为4画圆

为什么会没有5呢???

答:这里的5是,小于5的意思,计数器并不包括5本身

1.3变化粗细

一个点

两个点

三个点

N个点···

许多的小圆点向下运动之后逐渐形成了一颗小雨滴!

1.1列表的含义

思考一下:是什么让水滴变的越来越大了呢?

width(x/2)

水滴代码使用了width()命令,也就是画笔粗细命令,加深了画笔的宽度同时,水滴不停向下运动,就变得越来越大了!

画笔粗细

03

编写项目程序

Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryourtext.Clickheretoenteryour

文档评论(0)

Zeng + 关注
实名认证
文档贡献者

教师资格证持证人

该用户很懒,什么也没介绍

领域认证该用户于2025年05月30日上传了教师资格证

1亿VIP精品文档

相关文档