# Variables & Data Types > Eighth graders learn that programs store different kinds of data in variables — integers, strings, booleans, floats, and lists — and why knowing the right… **Computer Science** | **Grade 8** *A free lesson plan from K12 Academics. Source page: https://lessonplans.k12academics.com/k12-lesson-g8-cs-data-types.html* Eighth graders learn that programs store different kinds of data in variables — integers, strings, booleans, floats, and lists — and why knowing the right data type matters for writing correct code. **Copy link** works with Canvas, Schoology, Moodle and any other LMS — paste it in as a resource or assignment. ## Everything you need before the bell rings ### Learning Objectives Students will be able to… - Explain a **variable**. - Name key **data types**. - Match types to **examples**. - Use the right type. A program has to know: is this a number, some text, or true/false? Those are data types. What are the main data types, and why do they matter? ## Match the Data Type Project this and match each data type to an example — tap a data type, then tap its example. ## 50 minutes, five moves Tap any phase to open the teacher moves and student actions. ### Hook — Number, Text, or True/False? A program must know a value’s type — what are the data types? #### 👩‍🏫 Teacher Moves - Show mixed values. - Ask what kind each is. - Set the goal. #### 🎒 Student Actions - Look. - Wonder. - Predict. ### Unplugged — Unplug It Students practice. #### 👩‍🏫 Teacher Moves - Sort values by type. - Label each one. - Feel the difference. #### 🎒 Student Actions - Sort them. - Label them. - Feel it. ### Use — Match the Types Students use. #### 👩‍🏫 Teacher Moves - Send students to Match the Data Type. - Match each one. - Explain them. #### 🎒 Student Actions - Match. - Explain. - Check. ### Modify — Modify It Students modify. #### 👩‍🏫 Teacher Moves - Store each type in a variable. - Change a value. - Predict the type. #### 🎒 Student Actions - Store it. - Change it. - Predict. ### Create — Create Students conclude. #### 👩‍🏫 Teacher Moves - Name a data type and example. - Explain why type matters. - Complete the exit ticket. #### 🎒 Student Actions - Name it. - Explain it. - Complete the exit ticket. ## Built to the standards you report on Aligned to the CSTA K-12 Computer Science Standards and ISTE Standards for Students. Create variables that store data types. Represent data with different types. Use data types in programs. Computational Thinker. ## One lesson, every learner ### Multilingual Learners - Type + example cards. - Sentence frame: “A ___ holds ___.” - Use labeled values. ### Support & Access - Start with integer and string. - Match one pair at a time. - Use examples. ### Stretch & Extend - Add more types. - Explain type errors. - Convert between types. ### What to gather - 📽️Projector / board - 📦Value cards - 💻Match the Data Type - 💻Coding tool - ✏️Pens - 🎫Exit-ticket slips ### Key terms - **variable**: a named container for data - **data type**: the kind of data a value is - **integer**: a whole number - **string**: text data - **boolean**: a true/false value - **float**: a decimal number - **list**: an ordered collection - **value**: the data stored ## Exit Ticket Preview the three formative checks. Tap “Sample answer” to see what mastery looks like — hide them before you print for students. ### Create: name the type. Have students write one example of each of three data types. A printable data-types sheet is in the Computer Science library. ## Check your understanding **1. What does “variable” mean?** - a named container for data *(correct)* - a whole number - a true/false value - the kind of data a value is “variable” means: a named container for data **2. Which word means: “the kind of data a value is”?** - data type *(correct)* - float - variable - list “data type” means: the kind of data a value is **3. What does “integer” mean?** - the data stored - a whole number *(correct)* - text data - an ordered collection “integer” means: a whole number **4. Which word means: “text data”?** - value - string *(correct)* - float - data type “string” means: text data **5. What does “boolean” mean?** - a true/false value *(correct)* - a decimal number - a named container for data - the kind of data a value is “boolean” means: a true/false value **6. Which word means: “a decimal number”?** - string - float *(correct)* - boolean - list “float” means: a decimal number ## Printable worksheet --- Full lesson page: https://lessonplans.k12academics.com/k12-lesson-g8-cs-data-types.html All lessons: https://lessonplans.k12academics.com/