Programming
GCSE Computer Science · AQA 3.2 Programming · OCR 2.2 Programming fundamentals & 2.3 Producing robust programs
Data types and variables
- Integer (whole number), real/float (decimal), Boolean (True/False), character, string.
- Variables can change; constants can't. Use meaningful names.
- Casting: converting between types, e.g. int("42").
The three programming constructs
- Sequence: instructions run in order.
- Selection: IF, ELSE IF, ELSE; CASE/SWITCH.
- Iteration: count-controlled (FOR loop) and condition-controlled (WHILE loop, REPEAT…UNTIL / DO…UNTIL).
- Nesting: putting one construct inside another.
Keep reading in StudySam
The rest of this topic:
- Operators
- Strings, arrays and records
- Subroutines
- Robust and secure programs
- SQL basics
Key terms and facts
- Variable
- Named value that can change
- Constant
- Named value that can't change
- Integer
- Whole number
- Real / float
- Number with a decimal
- Boolean
- True or false
- Character
- A single letter or symbol
- String
- Text
- Casting
- Changing data type
- Sequence
- Instructions run in order
- Selection
- Choosing a path – IF statements
- Iteration
- Repeating code – loops
- Count-controlled loop
- FOR – runs a set number of times
Practise programming
← All GCSE Computer Science topics · Open GCSE Computer Science in StudySam