Community

Community resources

Computer science Worksheets and Python Workspaces shared by Coding Pathway teachers. Worksheets cover exam board theory as well as programming. Read any of them in full here. Teachers can copy one into their own lessons and edit it before setting it to a class.

Planning a whole course or unit? Our mapped pages put the teaching sequence in order with the Worksheets that cover it: OCR GCSE Computer Science (J277), Pearson Edexcel GCSE Computer Science (1CP2), OCR A Level Computer Science (H446), Python Turtle for Key Stage 3.

  • 438 resources
  • 3 teachers sharing
  • Creative Commons licensed

Functions Worksheets

8 resources match. Newest first. Opening a resource shows the whole thing, with answers and marking held back.

Worksheet

OCR H446 2.2.2 Programming and evaluating heuristics

Part 9 · H446 2.2.2 · Computational methods

H446 2.2.2 expects a heuristic to be transparent enough to test, so here the scoring rule becomes Python. Students implement job selection for a site-inspection team with a defined tie rule, design tests that isolate each part of the score, and then argue about what a new weighted term would do to the choices made. Students will: - translate a written scoring rule into a function that returns a score - implement a selection that returns the smallest-scoring option and keeps first-in-list order on a tie - design tests that isolate a single field, a boundary case and the tie rule - explain why examples chosen to match the code are weak evidence of correctness - assess the behaviour change, benefit, risk and evaluation of adding a weighted urgency term Inside: 7 explanation cells, 1 multiple-choice question, 1 fill-in-the-blanks cell, 1 written answer and 2 Python tasks. 18 marks, about 25 to 40 minutes. Series: H446 2.2.2 · Computational methods, part 9 of 14.

By Coding Pathway · 12 cells · 30 min · CC BY-SA 4.0 · Shared 31 Aug 2026

A LevelOCRFunctionsTesting and debugging
WorksheetSeries · 5 parts

H446 2.2.1 · Programming techniques

Includes OCR H446 2.2.1 Recursive functions

Recursion is examined in H446 2.2.1 as a tracing skill and a construction skill at once. This worksheet separates the two directions of a recursive call, the descent into smaller problems and the unwinding of returned values, so students can explain why a function terminates rather than only recognise the pattern. Students will: - distinguish the base case from the recursive case in a supplied function - trace recursive calls alongside the values returned as they unwind - explain termination and the order in which results are combined - write a recursive digit sum using remainder and integer division - repair a recursion that never reaches a base case and justify the repair Inside: 6 explanation cells, 2 multiple-choice questions, 1 fill-in-the-blanks cell, 2 written answers, 1 Python task and 1 trace table. 18 marks, about 25 to 35 minutes. Series: H446 2.2.1 · Programming techniques, part 3 of 14.

By Coding Pathway · 13 cells · 30 min · CC BY-SA 4.0 · Shared 31 Aug 2026

A LevelOCRFunctionsRecursion
WorksheetSeries · 2 parts

H446 2.1.3 · Thinking procedurally

Includes OCR H446 2.1.3 Decomposition and solution components

Thinking procedurally, OCR H446 2.1.3, starts with breaking a system apart along defensible lines. A student-run festival system and a community equipment-loan service give students practice at giving every component one responsibility and a clear interface. Students will: - distinguish the components of a problem from the components of a solution - give each component a single responsibility with named inputs and outputs - explain the problems caused by one component doing several unrelated jobs - propose better boundaries to replace an overloaded component - decompose an unfamiliar system and state a testing or teamwork benefit that follows Inside: 7 explanation cells, 1 multiple-choice question, 1 fill-in-the-blanks cell and 3 written answers. 22 marks, about 25 to 35 minutes. Series: H446 2.1.3 · Thinking procedurally, part 1 of 2.

By Coding Pathway · 12 cells · 30 min · CC BY-SA 4.0 · Shared 31 Aug 2026

A LevelOCRFunctionsComputational thinking
Worksheet

OCR H446 2.1.2 Program caching and reusable components

Part 2 · H446 2.1.2 · Thinking ahead

Caching and reusable components are the two thinking-ahead mechanisms named in OCR H446 2.1.2, and both fail when validity or the interface is left vague. Students trace hits and misses in a live-event app, judge a 24 hour cache policy against changing closures, and write a reusable duration formatter in Python. Students will: - trace a cache hit and a cache miss and say what is computed or stored in each - separate a program cache designed in application code from hardware processor cache - explain how a stale cached result arises and recommend a better policy - implement a small reusable function that honours a stated precondition - justify reusing a component and state one check to make before adopting it Inside: 8 explanation cells, 1 multiple-choice question, 2 fill-in-the-blanks cells, 2 written answers and 2 Python tasks. 23 marks, about 30 to 40 minutes. Series: H446 2.1.2 · Thinking ahead, part 2 of 2.

By Coding Pathway · 15 cells · 30 min · CC BY-SA 4.0 · Shared 31 Aug 2026

A LevelOCRFunctionsTesting and debugging
WorksheetSeries · 3 parts

1CP2-CT-3 · Lists, iteration and subprograms

Includes 1CP2-CT-3.5 Procedures and parameters

The first subprogram worksheet, separating defining a procedure from calling it, then adding parameters. Students will: - tell the definition of a procedure apart from a call to it - predict the output order of a program that calls procedures - write a procedure that takes one parameter - pass two arguments in the correct order - explain how a procedure supports separation of concerns Inside: 7 explanation cells, 3 multiple-choice questions, 2 Python tasks, 1 fill-in-the-blanks cell and 2 written answers. 18 marks, about 45 minutes. Series: 1CP2-CT-3 · Lists, iteration and subprograms, part 5 of 7.

By Coding Pathway · 15 cells · 45 min · CC BY-SA 4.0 · Shared 17 Aug 2026

GCSEEdexcelFunctionsScaffolded support
Worksheet

1CP2-CT-7.2 Subprograms parameters return values and scope

Part 2 · 1CP2-CT-7 · Subprograms, scope and libraries

The subprogram worksheet, separating what a procedure does from what a function returns and keeping scope under control. Students will: - distinguish a procedure from a function that returns a value - follow arguments, parameters and return values through nested calls - explain why a local variable suits an intermediate calculation - explain why a program should minimise global variables - propose subprogram responsibilities that separate concerns Inside: 7 explanation cells, 3 multiple-choice questions, 1 Python task, 1 fill-in-the-blanks cell and 3 written answers. 18 marks, about 45 minutes. Series: 1CP2-CT-7 · Subprograms, scope and libraries, part 2 of 5.

By Coding Pathway · 15 cells · 45 min · CC BY-SA 4.0 · Shared 17 Aug 2026

GCSEEdexcelFunctionsComputational thinking
WorksheetSeries · 2 parts

J277 2.2.3 · Strings, arrays and functions

Includes J277 2.2.3 Functions, parameters and return values

Functions, parameters and return values, and why parameters make one function reusable. Students will: - define a function with parameters and call it with arguments - return a value and store the result - distinguish a parameter from an argument - return a Boolean result from a test - explain why parameters make a function reusable Inside: 5 explanation cells, 3 runnable Python tasks, 2 multiple-choice questions, 1 fill-in-the-blanks cell and 2 written answers. 18 marks, about 45 minutes. Series: J277 2.2.3 · Strings, arrays and functions, part 4 of 5.

By Coding Pathway · 13 cells · 45 min · CC BY-SA 4.0 · Shared 17 Aug 2026

GCSEOCRFunctionsIntroduction
Worksheet

J277 2.3.1 Maintainable programs

Part 4 · J277 2.3 · Producing robust programs

The four maintainability techniques OCR requires, applied to code that already works but is hard to change. Students will: - explain what maintainability means and who it is for - use subprograms to break a program into focused parts - apply consistent naming conventions and indentation - comment code where a comment adds something - suggest only the improvements a given piece of code needs Inside: 5 explanation cells, 1 runnable Python task, 2 multiple-choice questions, 1 fill-in-the-blanks cell and 3 written answers. 20 marks, about 45 minutes. Series: J277 2.3 · Producing robust programs, part 4 of 7.

By Coding Pathway · 12 cells · 45 min · CC BY-SA 4.0 · Shared 17 Aug 2026

GCSEOCRFunctionsDefensive design