A LEVEL COMPUTER SCIENCE · TASTER LESSON

Thinking Like an
A Level Computer Scientist

From Data to Decisions

Begin the lessonScroll to reveal each slide
Warm-up

A real-world question

The scenario

A website stores 10,000 usernames.

A user types in their username to log in.

How could the computer check whether the username exists?

Possible answers

Have a think first — what would you try?

Stepping up

GCSE vs A Level

GCSE

You might write the code to search the list.

Focus

Getting the program to work.

A LEVEL — we also ask…
  • Is this the best way?
  • What happens when the list gets huge?
  • What data structure should we use?
  • How efficient is the algorithm?
Task 1

Linear search vs smarter thinking

Below is a list of usernames. Your task:

users = ["adam23", "bella99", "chen05", "dina11",
"elliot7", "fatima2", "george8"]
Your task

Write Python code to search the list and confirm a log-in for the username fatima2.

Now scale it up

What happens when the list grows?

10,000

What if there were 10,000 users?

Not found

What if the username was not in the list?

How many?

How many checks might be needed?

Think → Pair → Share

Key concept

Time complexity

At A Level, we start analysing algorithms — not just writing them.

“How does the algorithm grow as the data grows?”

This idea is known as time complexity.

A smarter approach

Binary search

Same list — but what if it were sorted? Watch how the search halves the problem each step.

Requires a sorted list — halves the search each step.
Live demo

Searching for "mia42"

[0]
adam23
LO
[1]
bella99
[2]
chen05
[3]
dina11
[4]
elliot7
[5]
fatima2
[6]
george8
MID
[7]
hassan4
[8]
imani21
[9]
jack77
[10]
kira88
[11]
luca09
[12]
mia42
[13]
noah31
HI
STEP
1 / 3
REMAINING
14 items
RANGE
[0, 13]
What happens here: arr[6] = "george8" < "mia42" → search the right half
Halving the list
7 items
3 items
1 item ✓

What's powerful about this idea?

  • Removes half the possibilities each time
  • Much faster for large lists
  • Only works if the data is sorted
  • How data is stored affects the algorithm we can use

A Level Computer Science is not just “can I code it?”

It is

“can I design a better solution?”

Task 2

Designing for a real problem

The brief

A school wants a system to check whether a student is allowed into the sixth form study room.

Each student needs the following details stored:

How could this data be stored in a Python file?

Data fields
name
string
year group
integer
behaviour points
integer
Students = [["Amira", 12, 4], ["Borris", 13, 17], ...]
A student is allowed in if…
  • They are in Year 12 or Year 13
  • They have fewer than 10 behaviour points
  • Their permission status is set to True
Your task

Write a function that takes a student's name as a parameter and returns True or False based on the conditions.

The big picture

GCSE vs A Level Computer Science

GCSE Computer Science
A Level Computer Science
Write simple programs
Design larger solutions
Use selection and iteration
Think about efficiency and scalability
Learn hardware components
Understand how systems work in more depth
Convert binary and hexadecimal
Explore how data is structured and processed
Follow algorithms
Analyse and improve algorithms
Learn Python basics
Build confidence with more complex programming