Variables & Data
Summary
This chapter shows how to create, name, set, and change variables such as side length, angle, and number of sides in order to control the drawings built in earlier chapters. Students also learn about variable scope, the difference between global and local variables, basic data types such as numbers and strings, and a first look at the list concept. It builds on the computational thinking vocabulary from Chapter 1, the motion and coordinate work from Chapter 4, and the drawing work from Chapter 6. After completing this chapter, students will be able to use variables to make their drawing scripts flexible instead of hard-coded.
Concepts Covered
This chapter covers the following 16 concepts from the learning graph:
- Variable
- Creating A Variable
- Naming A Variable
- Setting A Variable
- Changing A Variable
- Variable Value
- Side Length Variable
- Angle Variable
- Number Of Sides Variable
- Variable Scope
- Global Variable
- Local Variable
- Data Type
- Number Data
- String Data
- List Concept
Prerequisites
This chapter builds on concepts from:
- Chapter 1: Computational Thinking Foundations
- Chapter 4: Motion & Coordinates
- Chapter 6: Turtle-Graphics Drawing
TODO: Generate Chapter Content