Plan2Code Interactive Lesson
Data in the Real World
In this lecture we are going to learn how to think like a programmer. This is the first step in understanding all other concepts in computer science.
Discussion Questions
What is data?
Where can data be found?
Teacher's Response
Data is everywhere.
  • The number of students in a classroom,
  • one’s shoe size,
  • the title of a book...
...are all considered data in a computer program.

Definitions

Data - is any information that we use to make decisions.

Data types - are the categories for the information we use in computer programs.

Strings
Any information that can be described with a collection of letters, numbers, punctuation, or emojis (i.e. words, or phrases). All of these examples could be described as a string data type in a computer program.
For example, someone’s name, the title of a book or the contents of a book are all considered to be string data types to a computer program.
Numbers
Any information that has a quantity, can be measured, or has a specific value associated with it could be described as a number data type in a computer program.
For example, someone’s shoe size (11.5), the number of players on a baseball team, or the temperature outside in degrees Fahrenheit are all considered to be number data types to a computer program.
Activity
House
Instructions: Find one description from this picture below, that is either a string or a number.

Expectations: Let’s find as many pieces of data as possible and don’t worry, the teacher will you help out.
Review Questions

1. Which of the following pieces of information would be considered a string in a computer program. Select all that apply.

a. The title of a book.

b. The amount of blueberries in a bowl of cereal.

c. The name of a company.

2. Which of the following pieces of information would be considered a number in a computer program. Select all that apply.

a. The height of a building in feet.

b. The amount of blueberries in a bowl of cereal.

c. The name of a company.

3. Which of the following pieces of information would be considered a number in a computer program. Select all that apply.

a. A pet's name.

b. A car's brandname.

c. The amount of battery life on a device.

4. Which of the following pieces of information would be considered a string in a computer program Select all that apply.

a. The color of a house.

b. A car's brandname.

c. The amount of battery life on a device.

5. Which of the following pieces of information would be considered a number in a computer program. Select all that apply.

a. The value of a smart phone in U.S. dollars.

b. The amount of rain that fell this December.

c. The percentage of carbon in the atmosphere.

Author: Curtis A. Warren

Published December 29th, 2018 at 4:14pm EST
Last Updated January 1st, 2019 at 5:00pm EST

© 2018 Curtis A. Warren. All rights reserved.

Plan2Code.org