Homeschool Guide: These lesson plans are a guide for parents. Content may contain errors — always cross-reference with official exam board specifications.

input, output & string handling

FoundationHigherAll Boards

4 detailed 50-minute lessons with teaching scripts, worked examples, parent guides, and assessment criteria.

Fastmail

Lesson Overview

Total Lessons: 4
Tier: Foundation and Higher
Duration: 50 minutes per lesson (200 minutes total)
Exam Boards: AQA, Edexcel, OCR, Eduqas, CCEA

Learning Objectives

Prerequisites

Materials & Equipment

Lesson 1: Introduction: input, output & string handling

Duration: 50 minutes

Starter Activity (5 minutes)

Quick Recall

Write down everything you already know about input, output & string handling. Then check against the key terms: INPUT, OUTPUT, String operations. Use a mini-whiteboard or paper.

Main Content (35 minutes)

Parent/Teacher Guide:
Before lesson: Read the script below. Pre-teach key vocab: INPUT, OUTPUT, String operations.
If stuck: Re-read the revision notes (link above), then break the content into smaller steps.
Extension: See the Stretch & Challenge ideas in Lesson 4.
Teaching Script (35 mins):
Mins 0-5 - Hook: "Today: input, output & string handling. By the end you will be able to answer exam questions on it unaided. It connects to the rest of Computer Science because the ideas here recur across the spec."
Mins 5-20 - Direct Instruction: Work through the core ideas below one at a time; after each, ask your student to explain it back in their own words.
Mins 20-30 - Guided Practice: Model the worked example together, then let your student attempt the first practice question with guidance.
Mins 30-35 - Independent Practice: 2-3 practice questions from Lesson 3 below, with immediate feedback.
First Look

Start with the revision notes summary, then attempt: What does LENGTH("GCSE Computer Science") return?

Plenary (5 minutes)

Check Out

Your student states one thing they learned and one question they still have about input, output & string handling.

Lesson 2: Core Concepts: input, output & string handling

Duration: 50 minutes

Starter Activity (5 minutes)

Review Previous Lesson

Quick recap: write 3 key points from Lesson 1 on input, output & string handling. Check them against the notes below.

Main Content (35 minutes)

INPUT: gets data from the user (or another source) and stores it in a variable. In most pseudo-code, INPUT returns a string, so you may need to convert it to the correct data type.
Important: Data received via INPUT is usually a string. If you need to perform arithmetic, you must convert it using INT(), FLOAT(), or other type conversion functions.
OUTPUT: displays data to the user. You can output variables, strings, numbers, and expressions. Use & to concatenate (join) items in the output.
String operations: allow you to manipulate text data. At GCSE, you need to know LENGTH, POSITION (or INSTR), SUBSTRING, and concatenation.
Note: POSITION returns the index of the first character of the found substring. If the substring is not found, it returns -1. Positions are zero-indexed in many specifications.
Every character: is stored in a computer as a numeric code (ASCII or Unicode). The ASC() function converts a character to its code, and CHR() converts a code back to a character.
TermMeaningExample
ASC(character)Returns the character code of a single characterASC('A')
CHR(code)Returns the character for a given codeCHR(65)
'A'65
'Z'90
'a'97
'z'122
'0'48
'9'57

Practice (10 minutes)

Q: What does LENGTH("GCSE Computer Science") return?

Answer: 20 characters (including the space).

Plenary (5 minutes)

Explain Back

Your student teaches the key points back to you without looking. Fill any gaps immediately.

Lesson 3: Application: input, output & string handling

Duration: 50 minutes

Starter Activity (5 minutes)

Quick Recall

Recall the key terms: INPUT, OUTPUT, String operations. Define each in one sentence.

Main Content (35 minutes)

Parent/Teacher Guide: Let your student attempt each question alone first, then compare with the model answer. Award method marks for correct working even if the final answer is wrong.

Q1: What does LENGTH("GCSE Computer Science") return?

Answer: 20 characters (including the space).

Q2: Write pseudo-code that asks for a word and outputs the first three characters.

Answer: INPUT word OUTPUT SUBSTRING(word, 0, 3)

Q3: What is the ASCII code for 'A'? What is CHR(97)?

Answer: The ASCII code for 'A' is 65. CHR(97) = 'a'.

Q4: Write pseudo-code that takes two numbers as input, adds them, and outputs the result as a sentence.

Answer: INPUT "Enter first number: ", a INPUT "Enter second number: ", b num1 ← FLOAT(a) num2 ← FLOAT(b) total ← num1 + num2 OUTPUT a & " + " & b & " = " & STR(total)

Q5: Write pseudo-code that checks if the first character of a word is uppercase.

Answer: INPUT word firstChar ← SUBSTRING(word, 0, 1) IF ASC(firstChar) >= 65 AND ASC(firstChar) <= 90 THEN OUTPUT "First character is uppercase" ELSE OUTPUT "First character is not uppercase" ENDIF

Plenary (5 minutes)

Error Review

Review any questions answered incorrectly. Identify whether the error was knowledge, method, or reading the question.

Lesson 4: Exam Practice: input, output &amp; string handling

Duration: 50 minutes

Starter Activity (5 minutes)

Command Words

Review what these command words require: state (one point), describe (say what happens), explain (say why), compare (both sides), evaluate (judgement).

Main Content (35 minutes)

Extended Answer

Extended question: Full-Mark Response Write pseudo-code that inputs a full name (e.g. 'Jane Smith'), extracts and outputs the first name and last name separately, then outputs the initials in uppercase. [5 marks] <div class="

INPUT 'Enter full name: ', fullname space_pos ← 0 FOR i ← 0 TO LENGTH(fullname) - 1 IF fullname[i] = ' ' THEN space_pos ← i ENDIF NEXT i firstname ← SUBSTRING(fullname, 0, space_pos) lastname ← SUBSTRING(fullname, space_pos + 1, LENGTH(fullname) - space_pos - 1) OUTPUT 'First name: ' & firstname OUTPUT 'Last name: ' & lastname initials ← UPPER(firstname[0]) & '.' & UPPER(lastname[0]) & '.' OUTPUT 'Initials: ' & initials

Exam Tips: Always convert INPUT to the correct type before arithmetic | Remember: SUBSTRING(string, start, length) not (start, end) | POSITION returns -1 if the substring is not found | Know the key ASCII codes: A=65, a=97, 0=48 | Use & for string concatenation in pseudo-code | Use STR() to convert numbers to strings for output
Common Errors: ✗ Forgetting to cast input from string to the correct data type ✓ INPUT usually returns a string; you must convert it to INTEGER or REAL before arithmetic, e.g. age ← INTEGER(INPUT('Age: ')). ✗ Thinking string indexing starts at 1 in all languages ✓ Python and most languages use 0-based indexing; the first character is at index 0. Always check the convention for your exam board. ✗ Confusing LENGTH() and SUBSTRING() functions ✓ LENGTH() returns the number of characters in a string; SUBSTRING(string, start, length) extracts a portion of the string. ✗ Not realising that string concatenation does not add spaces automatically ✓ Joining 'Hello' & 'World' gives 'HelloWorld'. You must explicitly inc
Stretch & Challenge (Grade 8-9):
  • Synoptic links: explain how input, output &amp; string handling connects to another Computer Science topic you have studied
  • Real-world: research one real-world use or example of input, output &amp; string handling
  • Critical: "What are the limitations of the models used in input, output &amp; string handling?"

Plenary (5 minutes)

Assessment Criteria
  • Got it: Confident explanation + correct worked examples
  • Getting there: Main points OK, needs support with detail
  • Not yet: Confused on key concepts - re-run Lesson 2

Homework & Consolidation

Recommended Resources

🎓 Smart Lesson (Guided)