StudyDeck

Data Types

Exam code: 2210
Written by: Ashika|Reviewed by: Caroline Carroll|Updated 2 July 2026

Data Types

Data Types

What is a data type?

  • A data type is a classification of data into groups according to the kind of data they represent

  • Computers use different data types to represent different types of data in a program

  • The basic data types include:

Data type

Used for

Pseudocode

Example

Integer

Whole numbers

INTEGER

10, -5, 0

Real

Numbers with a fractional part (decimal)

REAL

3.14, -2.5, 0.0

Character 

Single character

CHAR

'a', 'B', '6', '£'

String

Sequence of characters

STRING

"Hello world", "ABC", "@#!%"

Boolean

True or false values

BOOLEAN

True, False

  • It is important to choose the correct data type for a given situation to ensure accuracy and efficiency in the program

  • Data types can be changed within a program, this is called casting

Programming data types

Data type

Pseudocode

Python

Integer

Number ← 5

number = 5

Real

RealNumber ← 3.14

realNumber = 3.14

Character 

FirstNameInitial ← 'a'

firstNameInitial = 'a'

String

Password ← "letmein"

password = "letmein"

Boolean

LightSensor ← True

lightSensor = True