Home
The current page has been customized from its template. Revert to template.
WORK IN PROGRESS - ALL STUDENTS CAN CLICK EDIT & CAN IMPROVE; PLEASE BE SENSIBLE & HELPFUL AT ALL TIMES.
EDEXCEL COMPUTER SCIENCE GCSE THEORY REVISION CORE NOTES
Core Revision Notes are below. We also have...
>> Interactive cards
>> Data and algorithm practice
>> Knowt flashcards
>> Paper 2 Code Knowledge Organiser By Question
>> Python tracing snippets quiz - learn PLS constructs
>> Python Sponge GCSE style problems
>> Crag n Dave Smart Revise
>> EdExcel Specification and PLS / Exam Materials
Topic 1:
Decomposition:
Breaking down a problem into smaller meaningful problems
... which are easier to solve (or can be broken down further)
e.g getting ready in the morning --> clean myself, dress myself, feed myself, get into the car
Abstraction:
Removing unnecessary detail [for representing]
To focus on the important aspects
e.g. pack of cards on computer: focus on suite and number instead of physical card dimensions/colours etc.
Benefits of subprograms
Aids decomposition:
Used to break down a complex program down to make it easier to program
Reduces duplicate code
Allows for easy reuse of code across more than one program
Allows diff parts of a large program to be worked on by any different programmers at the same time
Speeds up program development
Makes code easier to maintain/debug/fix.
Aids abstraction:
'hides' the complexity of the detail inside the subprogram
so code is easier to understand for a programmer
allows the subprogram to be updated independently
(particularly if the subprogram is a function which returns a calculated result)
Flowcharts:
Start/stop oval symbols
Parallelogram is input or output
, Diamond is decision (choice) and be labelled yes/no
Rectangle is an action (e.g increase x by 4)
Rectangle with extra side-lines is subprogram (which is pre-assigned, it calls it and then continues)
Every line must have arrows
Flowchart/pseudocode algorithms:
algorithm: a sequence of steps to solve a problem/task
input-process-output
sequence (ordering of code one line after the other), selection (choosing what code to do next), repetition (count-
controlled or condition controlled repeating of code), iteration (processing every item in a data structure)
The flowchart problem will probably iterate over a data structure e.g. Name[count] to get each letter in a string or
MyNames[count] to get each name in a list
Constants - values don't change at runtime unlike variables
The three data structures are strings (list of characters), records (2D with different data types) and arrays (2D with
same data types)
[records & arrays are both implemented as lists in python]
Arrays have one data type, Record have more than one
Trace tables:
have one column for each variable and for output usually
usually don’t fill in / repeat cells if not assigned
Remember to fill-in the initial values given in the code
Linear Search:
E.g compare looking for 3 in a list of [1,2,4,5]
Compares 3 with 1 [>]
Compares 3 with 2 [>]
Compares 3 with 4 [<]
Realises that 4 has passed the target so for efficiency quits (ONLY if we know list is ordered)
Binary Search:
E.g. compare looking for 1 in a list of [1,2,3,4,5,6,7]
Compares 1 with 4 (the median) [<]
Compares 1 with 2 (median of 1,2,3) [<]
1 is found
Bubble Sort
List: [13,5,10,50,4,6,20,9]
FIRST PASS:
Starts as 13,5,10,50,4,6,20,9 with 13 as the new 'bubble'
Compares 5 with 13. Swap --> 5,13,10,50,4,6,20,9
Compares 13 with 10. Swap --> 5,10,13,50,4,6,20,9
Compares 13 with 50. No Swap --> 5,10,13,50,4,6,20,9
Compares 50 with 4. Swap --> 5,10,13,4,50,6,20,9
Compares 50 with 6. Swap --> 5,10,13,4,6,50,20,9
Compares 50 with 20. Swap --> 5,10,13,4,6,20,50,9
Compares 50 with 9. Swap --> 5,10,13,4,6,20,9,50
The pass ends as: 5,10,13,4,6,20,9,50
If NO SWAPS happen in a complete pass then an efficient bubble sort can end (already sorted)
Alternatively for n items after n-1 passes the list must also definitely be sorted.
Merge Sort:
List: [13,5,10,50,4,6,20,9]
Split into halves. If odd, the half with 1 fewer item on the left.
13, 5, 10, 50 4, 6, 20, 9
Split into halves again.
13, 5 10, 50 4,6 20,9
Split until items are individualised.
13 5 10 50 4 6 20 9
The current page has been customized from its template. Revert to template.
WORK IN PROGRESS - ALL STUDENTS CAN CLICK EDIT & CAN IMPROVE; PLEASE BE SENSIBLE & HELPFUL AT ALL TIMES.
EDEXCEL COMPUTER SCIENCE GCSE THEORY REVISION CORE NOTES
Core Revision Notes are below. We also have...
>> Interactive cards
>> Data and algorithm practice
>> Knowt flashcards
>> Paper 2 Code Knowledge Organiser By Question
>> Python tracing snippets quiz - learn PLS constructs
>> Python Sponge GCSE style problems
>> Crag n Dave Smart Revise
>> EdExcel Specification and PLS / Exam Materials
Topic 1:
Decomposition:
Breaking down a problem into smaller meaningful problems
... which are easier to solve (or can be broken down further)
e.g getting ready in the morning --> clean myself, dress myself, feed myself, get into the car
Abstraction:
Removing unnecessary detail [for representing]
To focus on the important aspects
e.g. pack of cards on computer: focus on suite and number instead of physical card dimensions/colours etc.
Benefits of subprograms
Aids decomposition:
Used to break down a complex program down to make it easier to program
Reduces duplicate code
Allows for easy reuse of code across more than one program
Allows diff parts of a large program to be worked on by any different programmers at the same time
Speeds up program development
Makes code easier to maintain/debug/fix.
Aids abstraction:
'hides' the complexity of the detail inside the subprogram
so code is easier to understand for a programmer
allows the subprogram to be updated independently
(particularly if the subprogram is a function which returns a calculated result)
Flowcharts:
Start/stop oval symbols
Parallelogram is input or output
, Diamond is decision (choice) and be labelled yes/no
Rectangle is an action (e.g increase x by 4)
Rectangle with extra side-lines is subprogram (which is pre-assigned, it calls it and then continues)
Every line must have arrows
Flowchart/pseudocode algorithms:
algorithm: a sequence of steps to solve a problem/task
input-process-output
sequence (ordering of code one line after the other), selection (choosing what code to do next), repetition (count-
controlled or condition controlled repeating of code), iteration (processing every item in a data structure)
The flowchart problem will probably iterate over a data structure e.g. Name[count] to get each letter in a string or
MyNames[count] to get each name in a list
Constants - values don't change at runtime unlike variables
The three data structures are strings (list of characters), records (2D with different data types) and arrays (2D with
same data types)
[records & arrays are both implemented as lists in python]
Arrays have one data type, Record have more than one
Trace tables:
have one column for each variable and for output usually
usually don’t fill in / repeat cells if not assigned
Remember to fill-in the initial values given in the code
Linear Search:
E.g compare looking for 3 in a list of [1,2,4,5]
Compares 3 with 1 [>]
Compares 3 with 2 [>]
Compares 3 with 4 [<]
Realises that 4 has passed the target so for efficiency quits (ONLY if we know list is ordered)
Binary Search:
E.g. compare looking for 1 in a list of [1,2,3,4,5,6,7]
Compares 1 with 4 (the median) [<]
Compares 1 with 2 (median of 1,2,3) [<]
1 is found
Bubble Sort
List: [13,5,10,50,4,6,20,9]
FIRST PASS:
Starts as 13,5,10,50,4,6,20,9 with 13 as the new 'bubble'
Compares 5 with 13. Swap --> 5,13,10,50,4,6,20,9
Compares 13 with 10. Swap --> 5,10,13,50,4,6,20,9
Compares 13 with 50. No Swap --> 5,10,13,50,4,6,20,9
Compares 50 with 4. Swap --> 5,10,13,4,50,6,20,9
Compares 50 with 6. Swap --> 5,10,13,4,6,50,20,9
Compares 50 with 20. Swap --> 5,10,13,4,6,20,50,9
Compares 50 with 9. Swap --> 5,10,13,4,6,20,9,50
The pass ends as: 5,10,13,4,6,20,9,50
If NO SWAPS happen in a complete pass then an efficient bubble sort can end (already sorted)
Alternatively for n items after n-1 passes the list must also definitely be sorted.
Merge Sort:
List: [13,5,10,50,4,6,20,9]
Split into halves. If odd, the half with 1 fewer item on the left.
13, 5, 10, 50 4, 6, 20, 9
Split into halves again.
13, 5 10, 50 4,6 20,9
Split until items are individualised.
13 5 10 50 4 6 20 9