• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Start selling Create your account
Document preview thumbnail
Preview 3 out of 17 pages
Summary

Summary OCR GCSE Computer Science Paper 2 Notes

Document preview thumbnail
Preview 3 out of 17 pages

OCR GCSE Computer Science Paper 2 concise notes. Includes all information you need and are based on the specification and the mark scheme keywords. Based on OCR Exam Reference Language.

Content preview

Computer Science Notes
Paper 2 - Computational thinking, algorithms and programming

2.1 Algorithms
2.1.1 Computational Thinking

Decomposition means breaking down a problem into smaller, more manageable
sub-problems. Dealing with each small part of the problem is much simpler than trying to
deal with a complex system.

Abstraction is simplifying a problem by removing unnecessary detail in order to focus on
the important features.

Algorithmic Thinking is defining the problem in a series of steps to be carried out in order
to solve a problem. Identifying a precise set of instructions needed to solve a problem.

2.1.2 Designing, creating and refining algorithms

Pseudocode is presenting an algorithm using a structured form of English

,Trace tables
Trace tables involve going through an algorithm or program line-by-line.
Write down whenever a value changes.
A trace table is used to test algorithms and programs for logic errors that appear when an
algorithm or program executes

This algorithm to decide what bus fare rate to change. Complete the trace table for the input
value 7

01 age = int(input(“Enter age ”)
02 if age < 5 then
03​ fare = “Free”
04 elseif age < 16 then
05 ​ fare = “Half fare”
06 else
07 ​ fare = “Full fare”
08 print(fare)
09 endif


Line age fare Output

1 7

2 7

4 7

5 7 Half fare

8 7 Half fare Half fare


Types of errors
Syntax errors occur when the grammatical rules of the language have been broken or used
incorrectly
Examples:
Variables not declared properly before use
Incompatible data types

Logic errors occur during run-time and might produce unexpected or incorrect results
Examples:
Division by zero stops the program
Programs may not complete because of loop conditions being incorrect
Incorrect output
Causes:
Conditions that cannot be met in conditional statements
Incorrect algorithms
Incorrect expressions

, 2.1.3 Searching and sorting algorithms

Searching
Linear search
It starts with the first value and checks all values in order until it finds the target item.
If it reaches the end of list without finding the target item, it reports the item has not been
found

Advantages:
Easy to implement
Can search an unordered list

Disadvantages:
Every single value in the list needs to be checked before you can be certain that a value is
not present in a list which is time consuming.

Binary search
Select middle number or left of middle when the list is an even number
Checks if selected number is equal to target number
If searched number is larger, discard left half // if searched number is smaller, discard right
half
Repeat until the number is found or remaining list is of size 1/0 (number not found)

Advantages:
Highly efficient (much faster)

Disadvantages:
The list must be ordered so it cannot always be used

Document information

Study
School year
2
Uploaded on
August 28, 2026
Number of pages
17
Written in
2024/2025
Type
Summary
£5.89

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Sold
0
Followers
0
Items
2
Last sold
-



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions