Data Types and One-Dimensional Arrays
Select and implement characters, strings, integers, real numbers, Booleans and one-dimensional arrays.
How to study National 5 Computing Science
Move from functional requirements to designs and implementation, trace data and code carefully, and support testing and evaluation with evidence.
Core concepts
Concept 1
A character holds one symbol, a string holds a sequence, and numeric values use integer or real types.
Exam cue: Choose a type from the values and operations required, not from how the value happens to look.
Concept 2
A Boolean represents true or false conditions.
Exam cue: When tracing an array, record both its index range and the value at each position.
Concept 3
A one-dimensional array stores multiple values of the same type under one name and indexed positions.
Risk pitfalls and guardrails
Storing a count as a real number without need.
Guardrail: Check option route, data type, valid boundary, loop condition, array index, identifier and expected output before committing to the response.
Treating a one-dimensional array as a single scalar value.
Guardrail: Check option route, data type, valid boundary, loop condition, array index, identifier and expected output before committing to the response.
Memory anchors
Character
One letter, digit or symbol stored as a single character value.
String
A sequence of characters treated as text.
Integer
A whole-number value suitable for counts and discrete quantities.
Real
A numeric value that can include a fractional part.
Boolean
A value with two logical states, true or false.
One-dimensional array
An indexed collection of values of the same data type.
Checkpoint rule
Do the check-up only after you can summarize each concept in one sentence and identify one dangerous pitfall from memory.
Knowledge Check (after reading)
Short check-up to confirm understanding of this module.
Check-up Questions
A Boolean expression tests age >= 12 AND age <= 17. Which age passes?
Which condition accepts a code equal to 'A' or 'B'?
Answer all questions to submit.
Next step personalized recommendations
Continue learning
Move forward only after this module is stable.
What is Pass Harbor?
Completely free exam prep for 247 UK exams.
- Practice questions
- Flashcards
- Study guides
- Mock exams
- No registration
- No paywall
- Start instantly
“No more expensive exam prep. Quality study tools should be accessible to everyone.”
