Custom Blocks & Abstraction¶
Summary¶
This chapter centers on Scratch's Make a Block feature as an introduction to procedural abstraction, covering block definitions, naming, calling, and the single-responsibility principle for well-designed blocks. Students build reusable procedures such as a Draw Square block and a Draw Polygon block, compose them into a small block library, and practice refactoring existing scripts into custom blocks. It builds on the computational thinking ideas from Chapter 1, the scripting foundation from Chapter 3, and the drawing work from Chapter 6. After completing this chapter, students will be able to design, name, and reuse their own custom blocks instead of repeating code.
Concepts Covered¶
This chapter covers the following 18 concepts from the learning graph:
| Concept | Concept Impact Score |
|---|---|
| Custom Block | 39 |
| Make A Block Feature | 18 |
| Block Definition | 15 |
| Block Name | 1 |
| Procedural Abstraction | 20 |
| Function Concept | 8 |
| Procedure Concept | 1 |
| Reusable Procedure | 6 |
| Calling A Block | 2 |
| Block Body | 1 |
| Single Responsibility | 3 |
| Well-Designed Block | 2 |
| Draw Square Block | 1 |
| Draw Polygon Block | 1 |
| Block Library | 5 |
| Composing Blocks | 4 |
| Nested Custom Blocks | 1 |
| Refactoring A Script | 1 |
Prerequisites¶
This chapter builds on concepts from:
- Chapter 1: Computational Thinking Foundations
- Chapter 3: Sequencing & Scripts
- Chapter 6: Turtle-Graphics Drawing
TODO: Generate Chapter Content