Data Types A-Level

Data Types
24/01/24
1 / 18
next
Slide 1: Slide
ComputingUpper Secondary (Key Stage 4)GCSE

This lesson contains 18 slides, with text slides.

Items in this lesson

Data Types
24/01/24

Slide 1 - Slide

What data types can you name?

Slide 2 - Slide

Integer (int)

Slide 3 - Slide

Integer
Represents whole numbers without any decimal points. Examples: -3, 0, 42.

Slide 4 - Slide

Floating point (float)

Slide 5 - Slide

Floating point (float)
 Represents numbers with decimal points. 
Examples: -3.14, 2.718, 0.0.

Slide 6 - Slide

Character (char)

Slide 7 - Slide

Character (char)
Represents a single character
Examples: 'a", """ or "5".

Slide 8 - Slide

Boolean (bool)

Slide 9 - Slide

Boolean (bool)
Represents true or false values.
Examples: 1/0, true/false

Slide 10 - Slide

String

Slide 11 - Slide

String
Represents a sequence of characters. 
Example: "Hello, World!", "Oi, that's my sandwich. Yours is still in the fridge."

Slide 12 - Slide

Array

Slide 13 - Slide

Array
A collection of elements of the same data type. 
Example: int numbers[5] = {1, 2, 3, 4, 5};

Slide 14 - Slide

Date/Time

Slide 15 - Slide

Date/Time
Used to represent dates.
Examples: "20/01/2023".

Slide 16 - Slide

Record

Slide 17 - Slide

Record
A record is a composite data type that groups together related data fields under one name.
student_record = {"name":"Dave Davidson", "age":18, "grade":"A"}

Slide 18 - Slide