# 第3章：條件判斷（如果…那麼…）

> 透過「第3章：條件判斷（如果…那麼…）」掌握 Scratch 核心邏輯，依照「預測 → 執行 → 比較 → 說明」四步法穩步累積運算思維。

Scratch 系統教材「第3章：條件判斷（如果…那麼…）」：學習目標、實作步驟與自我檢核重點。

## 本節目標與核心觀念

透過「第3章：條件判斷（如果…那麼…）」掌握 Scratch 核心邏輯，依照「預測 → 執行 → 比較 → 說明」四步法穩步累積運算思維。

## 四步驟實作練習

透過「第3章：條件判斷（如果…那麼…）」掌握 Scratch 核心邏輯，依照「預測 → 執行 → 比較 → 說明」四步法穩步累積運算思維。

- 先看本節目標，想像程式按下綠旗後會怎麼運作。
- 在 Scratch 編輯器用最少積木組裝小實驗。
- 按下綠旗觀察結果，一次只修改一個數值驗證規律。
- 勾選下方學習完成紀錄，試著用自己的話講解原理。

**第3章：條件判斷（如果…那麼…）**

- When green flag clicked
- Forever
-   If <key (space) pressed?> then
-     Say (Space pressed!)
-   Else
-     Say (Waiting...)

動手試試看: Switches speech bubbles live as you press and release the Space bar.

## 繼續下一節

透過「第3章：條件判斷（如果…那麼…）」掌握 Scratch 核心邏輯，依照「預測 → 執行 → 比較 → 說明」四步法穩步累積運算思維。

- [回到 Scratch 系統教材目錄](/zh-tw/textbook/): Scratch 系統教材
- [查詢 Scratch 積木辭典](/zh-tw/dictionary/): Scratch 3.0

## 核心原理解析與 Scratch 3.0 運作機制 — 第3章：條件判斷（如果…那麼…）

在 Scratch 3.0（約 30FPS 更新機制）中，掌握變數初始化、迴圈順序與條件觸發時機，能讓作品穩定又容易擴充。

Real coding fluency comes from prediction, not passive copying. While studying "第3章：條件判斷（如果…那麼…）", pause before clicking the green flag to predict what the sprite will do, run the script, observe any difference, and adjust one block at a time. This predict-run-observe habit transfers directly to K–12 computer science, math, and text-based languages.

At its core, "第3章：條件判斷（如果…那麼…）" focuses on this key idea: 透過「第3章：條件判斷（如果…那麼…）」掌握 Scratch 核心邏輯，依照「預測 → 執行 → 比較 → 說明」四步法穩步累積運算思維。 In real classroom instruction supervised by Takamasa Suzuki (Okinawa Minecraft Club Programming School "Crosswave", weva.jp), learners progress much faster once they can explain which variable holds state, which event triggers updates, and how the stage resets cleanly on every green-flag click.

Always initialize sprite coordinates, direction, size, visibility, and variables explicitly at project start. A clean initialization sequence eliminates the notorious "you have to click the green flag twice" bug and makes testing predictable across Windows, macOS, Chromebooks, and iPads.

## 三步驟實作法：最小原型、邊界測試與原創延伸

Follow this three-stage workflow to turn "第3章：條件判斷（如果…那麼…）" from a quick example into a polished, bug-free feature inside your own Scratch 3.0 project. Test after every small change instead of stacking 30 blocks at once.

- Stage 1 (Minimal Working Test): Build only the core blocks for "第3章：條件判斷（如果…那麼…）" on a blank sprite and verify that the primary behavior works consistently on the very first green-flag click.
- Stage 2 (Edge-Case & Variable Monitor Check): Turn on stage variable monitors and test boundary cases—zero, negative numbers, stage borders (-240 to 240, -180 to 180), rapid key presses, and clone cleanup.
- Stage 3 (Original Art, Audio & Playtesting): Add custom vector/pixel costumes, balanced sound effects, clear instructions, and invite a friend or family member to playtest without hints so you can spot confusing moments immediately.

## 課堂應用、安全分享與進階路徑（Python / 實體互動）

Mastering "第3章：條件判斷（如果…那麼…）" strengthens math reasoning (coordinates, exterior angles, variables, probability), scientific modeling, and structured debugging. Once comfortable in Scratch 3.0, these exact patterns transfer smoothly into Python, Minecraft MakeCode, Roblox Studio, and web development.

Keep your projects original and safe to share: avoid uploading third-party copyrighted characters or songs, never include real names or personal photos, and write clear Notes and Credits whenever you remix or learn from another creator.

- [Scratch Dictionary](/zh-tw/dictionary/): Scratch 系統教材
- [Scratch Textbook](/zh-tw/textbook/): 在 Scratch 3.0（約 30FPS 更新機制）中，掌握變數初始化、迴圈順序與條件觸發時機，能讓作品穩定又容易擴充。
- [Scratch How-To](/zh-tw/howto/): 三步驟實作法：最小原型、邊界測試與原創延伸

更新日期: 2026-11-25
作者: [鈴木孝昌 (Takamasa Suzuki)](https://scratch.gmnavi.jp/about/author/)
Japanese Edition: https://scratch.gmnavi.jp/textbook/ch03-conditions/

[Scratch大全 (繁體中文)](https://scratch.gmnavi.jp/zh-tw/)
