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

Validation

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

Worksheet

OCR H446 2.2.1 Encapsulation and getters/setters

Part 10 · H446 2.2.1 · Programming techniques

Encapsulation is easiest to explain through a rule that has to hold, so this H446 2.2.1 worksheet fixes a check-in score to the range 1 to 5 and asks what keeps it there. Students correct the getter and setter faults that recur in exam answers, then implement validated access that refuses an out-of-range update. Students will: - explain encapsulation in terms of a rule the object must keep true - recognise why a getter that does not return a value fails as a function - rewrite a getter and setter in OCR exam reference language with a proper parameter and return - implement a setter that validates its input and leaves state unchanged when it refuses - explain how controlled access reduces coupling to a class's internal representation Inside: 7 explanation cells, 1 multiple-choice question, 1 fill-in-the-blanks cell, 2 written answers and 1 Python task. 19 marks, about 25 to 35 minutes. Series: H446 2.2.1 · Programming techniques, part 10 of 14.

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

A LevelOCRValidationObject-oriented programming
Worksheet

1CP2-CT-5.6 Authentication with ID and password lookup

Part 6 · 1CP2-CT-5 · Merge sort, files and authentication

The authentication worksheet, matching a credential pair on the same record rather than anywhere in the file. Students will: - keep validation and authentication distinct - explain why matching fields independently is insecure - implement a lookup that compares both fields of one record - describe the stages of authenticating against an accounts file - give three authentication tests with expected outcomes Inside: 7 explanation cells, 3 multiple-choice questions, 1 Python task, 1 fill-in-the-blanks cell and 3 written answers. 20 marks, about 45 minutes. Series: 1CP2-CT-5 · Merge sort, files and authentication, part 6 of 7.

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

GCSEEdexcelSelectionFile handling
Worksheet

1CP2-CT-4.4 Validating user input

Part 4 · 1CP2-CT-4 · Structures, validation and search

The validation worksheet, covering the four standard checks and the loop that applies them until the input is acceptable. Students will: - match a rule to the validation check that tests it - explain why a value is validated before it is used in a calculation - apply a format or pattern check - write the Boolean condition that is true when input is invalid - distinguish validation from verification and authentication Inside: 7 explanation cells, 3 multiple-choice questions, 1 Python task, 1 fill-in-the-blanks cell and 2 written answers. 16 marks, about 45 minutes. Series: 1CP2-CT-4 · Structures, validation and search, part 4 of 7.

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

GCSEEdexcelValidationPractice
WorksheetSeries · 3 parts

J277 2.3 · Producing robust programs

Includes J277 2.3.1 Defensive design and authentication

The first robust programs worksheet for OCR J277 2.3.1, on anticipating misuse and confirming who a user is. Students will: - explain what defensive design means - anticipate accidental and deliberate misuse of a program - describe how authentication confirms a user's identity - separate authentication from input validation - write a simple authentication check in Python Inside: 5 explanation cells, 2 runnable Python tasks, 2 multiple-choice questions, 1 fill-in-the-blanks cell and 3 written answers. 17 marks, about 45 minutes. Series: J277 2.3 · Producing robust programs, part 1 of 7.

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

GCSEOCRValidationDefensive design