Programming fundamentals
GCSE Computer Science · Unit 4: Programming
Programming fundamentals notes
Fact-checked by a second, independent AI review.
Overview of the basics: what programs are, how they represent data, and how code uses control structures to perform tasks. Prepare for short answer and code-writing questions on these core ideas.
- Variables and data types
- Variables store data values; common types include integer, floating-point, string and boolean, with assignment.
- Operators and expressions
- Operators perform calculations, comparisons or logical operations to form expressions that the program can evaluate.
- Control flow (sequencing, selection, iteration)
- Programs run in order (sequencing), choose branches with selection (if/else) and repeat steps using loops.
- Algorithms and pseudocode
- An algorithm is a step-by-step procedure; pseudocode helps plan code without syntax details.
- Functions/Procedures and debugging
- Functions group reusable code; debugging finds and fixes errors to ensure the program behaves as intended.
Remember it: Think: SIDES — Sequencing, Input/Output, Decisions, Else, Scenario testing.
Exam tip: Markers look for clear definitions, correct use of data types, correct control structures, and evidence of testing/debugging through example inputs and expected outputs.
Syllabus checklist
- Programming fundamentals: core ideas
- Terms and typical exam questions for "Programming" in GCSE Computer Science (OCR/AQA)
Practice questions
1. After code: a = 5; b = a + 3; What is b?
Answer checked
Show answer
Answer: 8. b equals 5 + 3, which is 8.
2. A variable can store only one value at a time.
Answer checked
Show answer
Answer: True. A variable holds a single value until reassigned.
3. A ____ stores multiple items of the same type.
Answer checked
Show answer
Answer: array. An array is a collection of items of the same type.
4. Which statement assigns 10 to x?
Answer checked
Show answer
Answer: x = 10. x = 10 assigns the value 10 to x.
5. The sum of 2, 4, and 6 is ____.
Answer checked
Show answer
Answer: 12. 2 + 4 + 6 equals 12.

Practise programming fundamentals as a game
Hearts, combos, streaks and an AI tutor that explains every answer. Start free.