Edexcel 1CP2 6.6.2: Writing functions and procedures
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
- F4.1 Writing functions Functions and structured code
def, calling, and why subprograms help. - F4.2 Parameters and return values Functions and structured code
Information in and an answer out; procedures and functions.
Try it on a robot
The task from F4.1 Writing functions, 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 7: Read a subroutine: purpose, outputs, return value, parameter 7 marks
- AQA 8525 June 2025 Paper 1, Question 11: Trace findLetter, then write the word game that calls it 14 marks
- AQA 8525 June 2024 Paper 1, Question 10: Trace three subroutines that call each other 2 marks
- AQA 8525 June 2024 Paper 1, Question 12.1 to 12.5: A sliding puzzle: move tiles, and read nested loops that find the blank 7 marks
- AQA 8525 June 2024 Paper 1, Question 12.6, 12.7: Use given subroutines to check a row and to play until solved 10 marks
- AQA 8525 June 2024 Paper 1, Question 14: Local variables, and a subroutine that counts busy days and returns the count 7 marks
- AQA 8525 June 2023 Paper 1, Question 4: Trace a Python function with three sets of inputs, then make it robust 4 marks
- AQA 8525 June 2023 Paper 1, Question 12.4: Fix a subroutine's parameter and a FOR loop that counts down 3 marks
- AQA 8525 June 2023 Paper 1, Question 14: Fill the gaps in an algorithm that uses a two-dimensional array 3 marks
- AQA 8525 June 2022 Paper 1, Question 11: Complete a subroutine that works out a sound file's size, local variables, why subroutines 10 marks
- AQA 8525 June 2022 Paper 1, Question 14.2: Write a subroutine that counts the asterisks on a bingo ticket 8 marks
- AQA 8525 Sample Paper 1, Question 9: Draw a robot's path through a grid from Forward, TurnLeft and ObjectAhead 6 marks
The specification is Edexcel's own document; this page says which of our lessons teach point 6.6.2 and is not endorsed by the board.