緻謝....................................................................................................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
· · · · · · (
收起)