Data Types

Computer ScienceOCRGCSEUnit: 3.2 Programming
Free taster
5 of 6 sections open
The basics

Different Kinds of Data

Different Kinds of Data

Just as you wouldn't store milk in a paper bag, computers store different kinds of data differently. An integer is a whole number (like counting apples: 1, 2, 3). A real/float has decimal places (like money: £19.99). A string is text (like a name: "Alice"). A boolean is true/false (like a light switch: on or off). A character is a single letter ('A'). Choosing the right type matters!

Now try it yourself

Quiz · Question 1 of 19

Which data type is most appropriate for storing a student's age?

Tap an answer to check it

Revise every Computer Science topic, free during alpha

Data Types is one of 60 topics on PrepWise — all aligned to your exam board.

Start revising free →