From Data to Decisions
A website stores 10,000 usernames.
A user types in their username to log in.
How could the computer check whether the username exists?
Have a think first — what would you try?
You might write the code to search the list.
Getting the program to work.
Below is a list of usernames. Your task:
Write Python code to search the list and confirm a log-in for the username fatima2.
What if there were 10,000 users?
What if the username was not in the list?
How many checks might be needed?
Think → Pair → Share
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.
Same list — but what if it were sorted? Watch how the search halves the problem each step.
A Level Computer Science is not just “can I code it?”
It is
“can I design a better solution?”
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?
Write a function that takes a student's name as a parameter and returns True or False based on the conditions.