Year 10 Data Type and Data Structure
Year 10 Data Type and Data Structure
Year 10
1. Data Types
2. Variables and constants
3. Input and Outputs in programming
4. Sequence
5. Totaling
6. counting
7. Selection
8. Iteration
9. Solving problems
10. Revision
DATA TYPES AND
STRUCTURES
DATA TYPES OBJECTIVES
String The string data type refers to text. A string is a Hello, 1$34A,
collection of characters and includes spaces, ninety-four
punctuation, numeric digits and any other
symbols such as $, &, £, etc. Strings can also
contain numeric digits but these will be
handled as text characters, not numbers.
MEMORY REQUIREMENT
Boolean 1 bit
Integer 4 bytes
Float 4 bytes
DATA STRUCTURES
Objectives - To:
• Knowledge objective: Explain the concept of data structure
• Learning Objective: explain the functions of data structure in
programming,
• Attitude objective: describe the various types of data structures
(constant, variable and array)
• Skill objective: Write simple code using these data structures
• Success criteria: The students need the following to be successful in
this lesson:
Understand what pseudocode is.
• Keyword: problem solving, pseudocode
What is a Data Structure?
Defined in a program to store single or multiple pieces of
data, it allows you to group related data together.
• Initialize means to assign a value to a variable at the initial stage of declaration e.g
CONST pi = 3.141 AS
Float
CONST VAT = 7.5
Difference between variable and constant
Variables can change during the course of a program while Constant does not
•
--> milk + eggs
Example of Variable changing in the course of a program
total
Consider the extract below and identify any variable or constant that will be needed for this program.
e.g item_number will be a variable
ARRAYS
Objectives:
• List out the different array data structures
• Differentiate between the different types of arrays
• Create 1-dimensional arrays
0 1 2 3 4
CarMakers[3] //This will bring out Nissan
Questions
1. In terms of an array, what is an index?
5
Questions
names=["Tom","Ali","22","Connie”]
scores=[2,3,5,4,2,1]