• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 3 fuera de 17 páginas
Resumen

Summary OCR GCSE Computer Science Paper 2 Notes

Document preview thumbnail
Vista previa 3 fuera de 17 páginas

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.

Vista previa del contenido

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

Información del documento

Estudio
Año escolar
2
Subido en
28 de agosto de 2026
Número de páginas
17
Escrito en
2024/2025
Tipo
Resumen
$8.13

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Vendido
0
Seguidores
0
Artículos
2
Última venta
-



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes