Scratch 是可视化的编程语言,其丰富的学习环境适合所有年龄阶段的人。利用它可以制作交互式程序、富媒体项目,包括动画故事、读书报告、科学实验、游戏和模拟程序等。《动手玩转Scratch2.0编程—STEAM创新教育指南》的目标是将Scratch 作为工具,教会读者最基本的编程概念,同时揭示Scratch 在教学上的强大能力。
《动手玩转Scratch2.0编程—STEAM创新教育指南》共分9 章,前三章讲解如何使用Scratch 绘制几何图形,并创建富媒体应用程序,其余章节使用Scratch 讲解各个编程概念。每一章都有许多完整的案例,读者可以模仿它们制作许多类似的程序。当读完整《动手玩转Scratch2.0编程—STEAM创新教育指南》后,相信你一定可以亲自完成各种编程项目。
《动手玩转Scratch2.0编程—STEAM创新教育指南》假定读者没有任何编程基础。《动手玩转Scratch2.0编程—STEAM创新教育指南》内容的难度基本不会超过高中数学,个别有难度的模拟程序可以先行跳过。
致谢....................................................................................................V
本书介绍...........................................................................................VII
第1章 准备开始.................................................................................1
什么是 Scratch ..................................................................................2
Scratch 编程环境 ..............................................................................3
试一试 1-1 ......................................................................................3
舞台 .........................................................................................................4
角色列表 .................................................................................................5
试一试 1-2 ......................................................................................5
试一试 1-3 ......................................................................................6
积木区 .....................................................................................................7
试一试 1-4 ......................................................................................8
脚本区 .....................................................................................................8
试一试 1-5 ......................................................................................9
试一试 1-6 ....................................................................................10
造型标签页 ...........................................................................................10
声音标签页 ...........................................................................................11
试一试 1-7 ....................................................................................11
试一试1-8 ....................................................................................12
背景标签页 ...........................................................................................12
角色信息 ...............................................................................................13
试一试 1-9 ....................................................................................13
工具栏 ...................................................................................................14
绘图编辑器 ......................................................................................15
设置图像的中心 ...................................................................................15
试一试 1-10 ..................................................................................16
设置透明色 ...........................................................................................16
制作第一个 Scratch 游戏 .................................................................17
第一步:准备背景 ...............................................................................18
第二步:加入反弹板和小球 ...............................................................18
第三步:让角色动起来 .......................................................................19
试一试 1-11 ..................................................................................20
第四步:添加声音更有趣 ...................................................................21
Scratch 积木一览 ............................................................................22
算术运算符和函数 ...........................................................................23
算术运算符 ...........................................................................................23
随机数 ...................................................................................................24
数学函数 ...............................................................................................25
本章小结 ..........................................................................................25
练习题 .............................................................................................25
第2章 动作和绘图...........................................................................29
使用动作模块的积木 ........................................................................29
绝对动作 ...............................................................................................30
试一试 2-1 ....................................................................................31
相对动作 ...............................................................................................32
试一试 2-2 ....................................................................................34
其他动作积木 .......................................................................................34
画笔模块和一个简单的画图程序 ......................................................35
试一试 2-3 ....................................................................................36
神奇的重复执行 ...............................................................................37
试一试 2-4 ....................................................................................37
旋转的正方形 .......................................................................................39
试一试 2-5 ....................................................................................39
试一试 2-6 ....................................................................................40
图章积木 ...............................................................................................40
Scratch 项目 ....................................................................................41
猫咪收集钱袋 .......................................................................................41
试一试 2-7 ....................................................................................41
接苹果游戏 ...........................................................................................45
关于被克隆的角色 ...........................................................................48
本章小结 ..........................................................................................49
练习题 .............................................................................................50
第3章 外观和声音...........................................................................53
外观模块 ..........................................................................................54
切换造型创建动画 ...............................................................................54
试一试 3-1 ....................................................................................55
试一试 3-2 ....................................................................................56
让角色思考并说话 ...............................................................................56
图形特效 ...............................................................................................57
角色大小和可视状态 ...........................................................................57
试一试 3-3 ....................................................................................58
角色间的图层 .......................................................................................58
声音模块 ..........................................................................................59
播放音频文件 .......................................................................................59
试一试 3-4 ....................................................................................59
弹奏鼓声和其他声音 ...........................................................................60
创作音乐 ...............................................................................................61
试一试 3-5 ....................................................................................62
试一试 3-6 ....................................................................................62
控制音量 ...............................................................................................62
设计 .......................................................................................................62
Scratch 项目 ....................................................................................63
在舞台上跳舞 .......................................................................................63
烟花效果 ...............................................................................................67
本章小结 ..........................................................................................69
练习题 .............................................................................................69
第4章 过程......................................................................................73
消息的广播和接收 ...........................................................................74
发送消息和接收消息 ...........................................................................75
使用广播机制协调多个角色 ...............................................................76
将大型程序分而治之 ........................................................................78
使用广播模拟过程 ...............................................................................80
创建自己的积木块 ...............................................................................81
给积木块添加参数 ...............................................................................83
试一试 4-1 ....................................................................................87
过程的嵌套 ...........................................................................................88
试一试 4-2 ....................................................................................90
分析问题的思维方式 ........................................................................90
自顶向下分析 .......................................................................................91
试一试 4-3 ....................................................................................93
自底向上分析 .......................................................................................94
本章小结 ..........................................................................................96
练习题 .............................................................................................96
第5章 变量......................................................................................99
Scratch 的数据类型 .......................................................................100
参数凹槽与积木形状 .........................................................................100
数据类型的自动转换 .........................................................................101
变量详解 ........................................................................................102
什么是变量? .....................................................................................102
创建并使用变量 .................................................................................105
试一试 5-1 ..................................................................................108
变量的作用范围 .................................................................................108
修改变量的值 ......................................................................................111
绘制蜘蛛网 .........................................................................................112
绘制风车 .............................................................................................112
克隆体中的变量 .................................................................................113
试一试 5-2 ..................................................................................113
变量值显示器 .................................................................................116
在程序中使用变量值显示器 ............................................................117
欧姆定律模拟实验 .............................................................................117
串联电路模拟实验 .............................................................................119
试一试 5-3 ..................................................................................119
计算球体体积和表面积 ....................................................................121
试一试 5-4 ..................................................................................121
绘制玫瑰花瓣 .....................................................................................123
试一试 5-5 ..................................................................................123
葵花籽分布模型 .................................................................................125
试一试 5-6 ..................................................................................125
获得用户输入 ................................................................................127
读取数字 .............................................................................................127
试一试 5-7 ..................................................................................127
读取字符 .............................................................................................128
执行算术运算 .....................................................................................128
本章小结 ........................................................................................129
练习题 ...........................................................................................129
第6章 用逻辑做决定......................................................................133
比较操作符 ....................................................................................134
布尔表达式的求值 .............................................................................136
比较字符和字符串 .............................................................................136
分支结构 ........................................................................................138
如果…那么积木块 .............................................................................138
将变量作为标志 .................................................................................139
如果…那么否则积木 .........................................................................141
嵌套分支结构 .....................................................................................142
菜单驱动程序 .....................................................................................143
逻辑运算符 ....................................................................................144
且操作符(and) .................................................................................145
或操作符(or) ...................................................................................146
不成立操作符(not) ..........................................................................147
使用逻辑运算符检查数值范围 .........................................................148
Scratch 项目 ..................................................................................150
坐标猜测游戏 .....................................................................................150
试一试 6-1 ..................................................................................152
三角形分类游戏 .................................................................................152
试一试 6-2 ..................................................................................156
猫咪巡线 .............................................................................................156
试一试 6-3 ..................................................................................157
求解直线方程 .....................................................................................158
试一试 6-4 ..................................................................................162
其他应用程序 .....................................................................................162
本章小结 ........................................................................................162
练习题 ...........................................................................................162
第7章 深入循环.............................................................................165
循环结构 ........................................................................................166
重复执行直到积木 .............................................................................166
试一试 7-1 ..................................................................................168
将重复执行和如果…那么结合 .........................................................168
试一试 7-2 ..................................................................................169
停止积木 ........................................................................................170
试一试 7-3 ..................................................................................171
结束过程调用 .....................................................................................172
验证用户输入 .....................................................................................173
循环计数器 ....................................................................................174
密码验证 .............................................................................................174
灵活的循环计数 .................................................................................175
试一试 7-4 ..................................................................................175
循环的嵌套 ....................................................................................177
递归:调用自身的过程 ..................................................................179
试一试 7-5 ..................................................................................179
Scratch 项目 ..................................................................................181
模拟时钟 .............................................................................................181
试一试 7-6 ..................................................................................181
小鸟射击游戏 .....................................................................................183
试一试 7-7 ..................................................................................183
自由落体实验 .....................................................................................187
试一试 7-8 ..................................................................................187
试一试 7-9 ..................................................................................190
抛体运动模拟器 .................................................................................190
其他应用程序 .....................................................................................193
本章小结 ........................................................................................193
试一试 7-10 ................................................................................193
练习题 ...........................................................................................194
第8章 字符串处理.........................................................................197
字符串数据类型 .............................................................................198
特殊字符统计 .....................................................................................198
字符比较 .............................................................................................199
字符串操作示例 .............................................................................201
Igpay Atinlay .......................................................................................201
试一试 8-1 ..................................................................................201
单词修正 .............................................................................................203
试一试 8-2 ..................................................................................203
解密游戏 .............................................................................................205
试一试 8-3 ..................................................................................205
Scratch 项目 ..................................................................................208
射击游戏 .............................................................................................208
二进制数到十进制数转换 .................................................................211
试一试 8-4 ..................................................................................211
试一试 8-5 ..................................................................................212
试一试 8-6 ..................................................................................214
刽子手游戏 .........................................................................................214
试一试 8-7 ..................................................................................219
分数运算教学工具 .............................................................................220
试一试 8-8 ..................................................................................224
本章小结 ........................................................................................225
练习题 ...........................................................................................225
第9章 链表....................................................................................227
Scratch 的链表 ..............................................................................228
创建链表 .............................................................................................228
试一试 9-1 ..................................................................................230
链表的积木 .........................................................................................231
添加和删除 .........................................................................................231
插入和替换 .........................................................................................231
获得链表中的变量 .............................................................................232
包含积木 .............................................................................................233
边界检查 .............................................................................................233
试一试 9-2 ..................................................................................233
动态链表 ........................................................................................234
向链表填充用户输入 .........................................................................234
绘制柱状图 .........................................................................................236
数字链表 ........................................................................................239
寻找最值 .............................................................................................239
试一试 9-3 ..................................................................................239
试一试 9-4 ..................................................................................240
计算平均数 .........................................................................................240
搜索和排序 ....................................................................................241
线性搜索 .............................................................................................241
试一试 9-5 ..................................................................................241
频数统计 .............................................................................................242
试一试 9-6 ..................................................................................244
冒泡排序 .............................................................................................244
试一试 9-7 ..................................................................................246
寻找中位数 .........................................................................................247
Scratch 项目 ..................................................................................248
我是诗人 .............................................................................................248
四边形分类游戏 .................................................................................249
试一试 9-8 ..................................................................................249
试一试 9-9 ..................................................................................251
数学魔法师 .........................................................................................252
花的结构测验 .....................................................................................255
试一试 9-10 ................................................................................255
其他应用程序 .....................................................................................257
试一试 9-11 ................................................................................257
本章小结 ........................................................................................258
练习题 ...........................................................................................258
附录A 分享与合作..........................................................................261
创建 Scratch 账号 .........................................................................261
使用书包功能 ................................................................................264
创建项目 ........................................................................................266
创建新的项目 .....................................................................................266
项目再创作 .........................................................................................267
项目页 .................................................................................................268
分享项目 .............................................................................................268
本书的编写基于Malmö大学实体原型(PhysicalPrototyping)实验室的教学内容。PhysicalPrototyping实验室是最早建立Ardui...
地理信息系统算法基础 内容简介 本书全面、系统地收集和整理了当前地理信息系统算法领域的相关资料,以地理信息系统设计与实现为线索,内容涉及地理空间数据的描述、检索...
《HTML 5开发精要与实例详解》内容简介:这是一本以综合性案例为导向并辅之以精要知识点讲解的HTML 5实战教程。内容分为两大部分:
《GIS在城市管理中的应用》主要介绍GIS基本功能在城市管理中的具体使用与实现途径。分别针对城市综合应用、城市规划、城市土地管
《中国创投地图2》内容简介:《中国创投地图2》围绕着人工智能、区块链、教育、医疗、小程序、新零售,聚百家之言,从行业专家、投
本书是美国普渡大学资深教授DouglasE.Comer从计算机系统结构对编程影响的角度为计算机科学、技术、应用类学生精心编写的计算机系
本书系统地阐释了OFDM技术的基本原理、关键技术及与其他一些技术的结合,重点分析了OFDM技术在无线物理层上的一些关键的问题,并
《新税法下企业纳税筹划(第7版)》内容简介:本书根据最新的税收政策论述了企业所得税、个人所得税、增值税、消费税等主要税种的纳
本书结合理论知识和实例程序,全面而系统地介绍了Objective-C编程的相关内容,包括类和继承、对象的类型和动态绑定、基于引用计数
杭间,1961年生于浙江义乌,文学博士,清华大学美术学院副院长,教授,博士生导师。毕业于中央工艺美术学院艺术史论系,1996年至2
《围观考古现场》内容简介:翻开这本书之前,请你思考一个问题:考古学究竟是一门怎样的学问?是挖坟掘墓找古董?是翻山越岭看岩壁
《创新家装设计图典(第4季):客厅》内容简介:全新升级的《创新家装设计图典第4季》将继续为读者提供新的设计案例,针对居室各空
《文化南京》内容简介:本书拟从时间、空间和文化三个层面对南京进行深度解读,集中展示南京历史文化形象,总结南京历史文明的发展
《JavaWeb编程从入门到实践》内容简介:JavaWeb开发是目前最流行的网络开发技术之一。《JavaWeb编程从入门到实践》由浅入深,结合
本书从操作系统原理的角度,详细解析了Windows如何实现现代操作系统的各个关键部件,包括进程、线程、物理内存和虚拟内存的管理,
《走向人文关怀的高中美术校本课程开发》内容简介:本书运用后现代课程理论和建构主义学习理论,深入探讨了如何开发凸显人文关怀的
ForcoursesinDigitalCommunications.Providesacomprehensiveandin-depthintroductiont...
《疯狂的站长》内容简介:受全球性金融危机的影响,就业变得越来越困难,众多青年,包括大学毕业生,无不感到就业的巨大压力,站长
《机器学习编程》内容简介:使用监督学习从头构建一个图像识别应用程序。用线性回归预测未来。深入研究梯度下降,这是一种驱动大部
《佛教论集(精)》内容简介:本书为南开大学教授孙昌武先生有关佛教研究的论文结集,共收入1996-2018年十三年来发表于各类刊物上的