Computer Science Grade 7 20 min

Lesson 1: What is Data? Understanding the Building Blocks of Information

Define data and discuss different types of data (numbers, text, images, etc.).

Tutorial Preview

1

Introduction & Learning Objectives

Learning Objectives Define 'data' in the context of computer science. Differentiate between basic data types: integer, string, and boolean. Explain why organizing data is important for creating efficient computer programs. Identify a list as a simple data structure and describe its purpose. Provide real-world examples of how data is collected and organized in lists. Create a simple list in pseudocode to store related pieces of data. Ever wonder how your phone instantly finds a friend's number in your contacts? 📱 It's all about how the data is organized! In this lesson, we'll discover what 'data' really is and explore the first step in organizing it: data structures. Learning this helps us write faster, smarter, and more powerful programs...
2

Key Concepts & Vocabulary

TermDefinitionExample DataAny information that can be stored and processed by a computer.The number 12, the word 'hello', or the fact that a button is clicked (True). Data TypeA category that tells the computer what kind of data a value is, like a number or text.The number `7` is an `Integer` data type, while the word `"pizza"` is a `String` data type. IntegerA data type for whole numbers (no fractions or decimals).Player scores like `-10`, `0`, or `9500`. StringA data type for a sequence of characters, like text. It is usually surrounded by quotes.A username like `"Gamer123"` or a message like `"Hello, world!"`. BooleanA data type that can only have one of two values: True or False.A variable named `isGameOver` could be `True` or `False`. Data Stru...
3

Core Syntax & Patterns

Creating a List variable_name = [item1, item2, item3] To create a list, give it a name, use an equals sign, and put your items inside square brackets `[]`, separated by commas. Accessing an Item by Index list_name[index] To get a single item from a list, you use its index (position). Computers start counting from 0, so the first item is at index 0, the second at index 1, and so on. Adding an Item to a List list_name.append(new_item) To add a new item to the very end of an existing list, you can use a command like `append`.

4 more steps in this tutorial

Sign up free to access the complete tutorial with worked examples and practice.

Sign Up Free to Continue

Sample Practice Questions

Challenging
A program needs to store information about a book: its title (e.g., "The Hobbit"), the year it was published (e.g., 1937), and whether it is currently checked out from the library (e.g., True). Which three data types, in order, are best suited for this?
A.String, String, String
B.Integer, String, Boolean
C.List, Integer, String
D.String, Integer, Boolean
Challenging
A programmer wants to get the third item from the list `shopping = ["Milk", "Eggs", "Bread"]`. They use the code `shopping[3]`. What is the most likely result when the program runs?
A.It will return "Bread".
B.It will return nothing.
C.It will return the entire list.
D.It will cause an 'index out of range' error.
Challenging
Consider the following pseudocode: `scores = [90, 85]`, then `scores.append(100)`, then `scores.append(75)`. What is the final state of the `scores` list?
A.[90, 85, 100, 75]
B.[75, 100, 85, 90]
C.[90, 85, 175]
D.[100, 75]

Want to practice and check your answers?

Sign up to access all questions with instant feedback, explanations, and progress tracking.

Start Practicing Free

More from Chapter 3: Introduction to Data Structures: Organizing Information for Efficiency

Ready to find your learning gaps?

Take a free diagnostic test and get a personalized learning plan in minutes.