OCR J277 2.2.2: Data types
The free BugBot lessons that teach this point, a robot to try it on, and the past-paper questions that test it.
Lessons that teach it
- F1.8 Data types and casting Programming basics
Integer, real, Boolean, character and string, and converting between them. - F3.2 Character codes and conversion Strings, lists and records
ord and chr, ASCII, comparing strings, and a Caesar cipher.
Try it on a robot
The task from F1.8 Data types and casting, running here. Change the program and press Run.
Past paper questions on this
Real exam questions that test this, each worked through with a program you can run.
- AQA 8525 June 2025 Paper 1, Question 5: Data types, and five inputs rewritten as a loop with one 8 marks
- AQA 8525 June 2022 Paper 1, Question 2: Follow a nested IF with AND, then name the data types 6 marks
- AQA 8525 Sample Paper 1, Question 3: The dog biscuit algorithm: selection, iteration, subroutine calls and a data type 5 marks
- AQA 8525 Sample Paper 1, Question 5: A taxi fare: 2 pounds a passenger plus 1.50 a kilometre 7 marks
- AQA 8525 Sample Paper 1, Question 8: Output LOWER or NOT LOWER for a character 7 marks
- OCR J277 June 2025 Paper 2, Question 4: Complete an algorithm that reads numbers from a text file, and casting 6 marks
- OCR J277 June 2025 Paper 2, Question 6(b): Correct four errors in an SQL statement, a record, and data types 7 marks
- OCR J277 June 2024 Paper 2, Question 6: String methods: upper, left, right with a cast, and concatenation 6 marks
- OCR J277 June 2023 Paper 2, Question 6(f): Casting, and totalling a column of a 2D array for one date 7 marks
- OCR J277 June 2022 Paper 2, Question 2(d): Casting, and a trace table for a while loop that pads a staff ID 6 marks
- Edexcel 1CP2 June 2025 Paper 2, Question 3: Rearrange mixed-up lines: ASCII totals and a digit added by divisibility 15 marks
- Edexcel 1CP2 June 2024 Paper 2, Question 2: Choose the right lines to make a Caesar cipher with ord() and chr() 10 marks
The specification is OCR's own document; this page says which of our lessons teach point 2.2.2 and is not endorsed by the board.