Edexcel GCSE Computer Science 2020

6: Programming

Revision tools
You can print this page for a quick reference guide or you can use the tools below to create printable test sheets
6.1.1: be able to use decomposition and abstraction to analyse, understand and solve problems
Programming
KeywordDefinition
abstractionremoving unnecessary detail in order to focus on what's most important
decompositionbreaking down a problem into smaller sections to make it easier to solve
6.1.2: be able to read, write, analyse and refine programs written in a high-level programming language
Programming
KeywordDefinition
assemblyexample of a low level programming language
high leveltype of programming language where a small amount of code can solve large problems by hiding unnecessary details about how the CPU and memory are managed
low leveltype of programming language which can require a large amount of code to solve even small problems because you have complete control over the CPU and memory management
programming languagea way of describing data structures and algorithms to tell a computer how to solve a problem
pythonexample of a high level programming language
6.1.3: be able to convert algorithms (flowcharts, pseudocode) into programs and convert programs into algorithms
Programming
KeywordDefinition
decisiondiamond seen in a flowchart whenever the algorithm has to make a choice what to do next
flowchartdiagram which shows each stage of an algorithm
inputparallelogram seen in a flowchart whenever data is entered into an algorithm
outputparallelogram seen in a flowchart whenever data is sent out or displayed from an algorithm
processrectangle seen a flowchart wherever a calculation takes place
program codealgorithm written in a formal way so that it can be run on a computer
pseudocodeinformal written description of a program which does not require any strict programming syntax
syntaxrules for a programming language
terminatorrounded rectangle seen at the start and end of each flowchart
6.1.4: be able to use techniques (layout, indentation, comments, meaningful identifiers, white space) to make programs easier to read, understand and maintain
Programming
KeywordDefinition
commentscode is easier to read when each line or section of code is described in a way that helps other programmers understand what it does
identifierscode is easier to read when variables, constants and sub programs have names which describe what they store or do
indentationcode is easier to read when tabs or spaces are used to move blocks of code across to the right. This is necessary in python but optional in other programming languages
layoutcode is easier to read when it is organised into sections e.g. imports, constants, global variables, sub programs then the main program code
whitespacecode is easier to read when blank lines are used to break the code into logical paragraphs
6.1.5: be able to identify, locate and correct program errors (logic, syntax, runtime)
Programming
KeywordDefinition
logic errora type of error which occurs when the program does what it's told to do, but the programmer told it to perform the wrong calculation
runtime errora type of error which occurs when the program crashes because it attempts to do something impossible
syntax errora type of error which occurs when the program will not run at all because the programmer has broken the rules of the programming language
6.1.6: be able to use logical reasoning and test data to evaluate a program's fitness for purpose and efficiency (number of compares, number of passes through a loop, use of memory)
Programming
KeywordDefinition
comparisonsthe number of items of data an algorithm has to check before it finishes solving a problem
efficiencyhow good one algorithm is at solving a problem compared to another
iterationsthe number of times an algorithm has to repeat a sequence of instructions before it finishes solving a problem
logical reasoningbeing able to compare one algorithm with another and explain which is most suitable for solving a problem
memory usethe number of different data values an algorithm has to store at the same time in order to solve a problem
test datathe values given to an algorithm as input in order to see what outputs it gives and how long it takes to solve a problem
6.2.1: understand the function of and be able to identify the structural components of programs (constants, variables, initialisation and assignment statements, command sequences, selection, repetition, iteration, data structures, subprograms, parameters, input/output)
Programming
KeywordDefinition
assignmentsetting the value of a variable at any time in a program e.g. score = 1
command sequencepart of an algorithm where multiple instructions are carried out in a particular order
constantnamed value which is set once but can be used multiple times e.g. MAX_SCORE = 10
data structurea named area of memory which stores multiple values (e.g. scores = [1,2,3])
initialisationsetting the value of a variable or constant at the start of the program e.g. score = 0
inputdata which goes in to an algorithm or program e.g. input(...)
iterationpart of an algorithm that repeats instructions for each value in a data structure e.g. for ... in ...
outputdata which comes out from an algorithm or program e.g. print(...)
parametera value which is passed into a sub program e.g. def square(size):
repetitionpart of an algorithm that is run a set number of times or whilst a condition is met e.g. while lives > 0:
return valuea value which is passed out from a function
selectionpart of an algorithm where a condition is checked to see which instructions are run next e.g. if ... :
sub programa named part of a program which can be called multiple times (either a procedure or a function) e.g. def square():
variablenamed memory location which stores a value which can be set and used multiple times e.g. score = 0
6.2.2: be able to write programs that make appropriate use of sequencing, selection, repetition (count-controlled, condition-controlled), iteration (over every item in a data structure) and single entry/exit points from code blocks and subprograms
Programming
KeywordDefinition
code blocksection of code which is all indented by the same amount
entry pointthe first line of code which is executed
exit pointthe last line of code in a code block or subprogram to be executed
functionnamed section of code which can be called multiple times and always returns a value
iterationusing FOR to loop through each value in a data structure (e.g. list or string)
procedurenamed section of code which can be called multiple times and never returns a value
repetitionusing FOR or WHILE to allow code to repeat a set number of times or whilst a condition is met
selectionusing IF to allow code to make a choice
sequencemultiple lines of code that have to be executed in order
subprograma procedure or function
6.3.1: be able to write programs that make appropriate use of primitive data types (integer, real, Boolean, char) and one and two-dimensional structured data types (string, array, record)
Programming
KeywordDefinition
arraydata structure which stores a fixed number of values of the same data type arranged in order
booleanTrue or False
charindividual letter, symbol or digit
integera whole number
listdata structure which can grow or shrink to store as many values as required, keeping them in order
primitive data typethe type of data for a variable or constant which holds an individual value
reala number with a decimal point
recorddata structure which stores multiple values of different data types arranged in order
stringdata structure which stores multiple characters arranged in order
structured data typethe type of data for a variable or constant which holds multiple values
6.3.2: be able to write programs that make appropriate use of variables and constants
Programming
KeywordDefinition
assignmentsetting the value of a variable
constantnamed value which is set once but remains the same whilst the program runs
identifierthe name of a variable or constant
initialisationsetting the value of a variable or constant for the first time
naming conventionset of rules for choosing suitable variable or constant names
valuethe data stored in a variable or constant
variablenamed memory location which can store a value which can change as the program runs
6.3.3: be able to write programs that manipulate strings (length, position, substrings, case conversion)
Programming
KeywordDefinition
case conversionchanging a string from uppercase to lowercase or the other way round
characterindividual symbol, letter or digit that forms part of a string
concatenationjoining multiple strings together into a single string
lengththe number of characters that makes up a string
lowercasestring without any capital letters
positionnumber which identifies where you need to look in a string to find a specific character (starting from 0 at the beginning)
stringdata structure which stores multiple characters in order
substringgetting a string of characters from inside another string
uppercasestring made up of all capital letters
6.4.1: be able to write programs that accept and respond appropriately to user input
Programming
KeywordDefinition
boolean expressiona question with a True or False answer
outputusing print(...) to display a message to the user
selectionusing if to decide what to run next based on a boolean expression
user inputusing input(...) to ask the user a question
6.4.2: be able to write programs that read from and write to comma separated value text files
Programming
KeywordDefinition
appendsaving data on to the end of an existing file
comma separated valuefile that can be opened by spreadsheet software because a table of data is stored as lines of text with commas between each value
readloading data from a file
text filefile that can be opened in a editor like notepad where data is stored in a way that can be understood by humans
writesaving data to a file, overwriting what's already there
6.4.3: understand the need for and be able to write programs that implement validation (length check, presence check, range check, pattern check)
Programming
KeywordDefinition
input datathe values that are sent into a program (e.g. from the user or a file)
length checktype of validation that checks the number of characters in input data
pattern checktype of validation that checks that input data matches a specific sequence of letters, symbols or digits
presence checktype of validation that checks to see if input data is empty or not
range checktype of validation that checks that input data is between minimum and maximum values
validationchecking data (often user input) to see if it is suitable to be processed by a program
6.4.4: understand the need for and be able to write programs that implement authentication (ID and password, lookup)
Programming
KeywordDefinition
authenticationchecking that a user is allowed to log in to a computer system
IDunique identification data such as username, number or email
lookupchecking to see if a users ID and password matches a list of approved user details in a database or file
passwordsecret data which can be entered and checked when logging in to a computer system
6.5.1: be able to write programs that use arithmetic operators (addition, subtraction, division, multiplication, modulus, integer division, exponentiation)
Programming
KeywordDefinition
-arithmetic operator which subtracts one number from another
-=arithmetic operator which decreases a variable by a given amount
*arithmetic operator which multiplies one number by another
**arithmetic operator which raises a number to a power
*=arithmetic operator which multiplies a variable by a given amount
/arithmetic operator which divides one number by another
//arithmetic operator which divides one number by another giving the result as an integer, always rounding down
/=arithmetic operator which divides a number by a given amount
%arithmetic operator which finds the modulus (remainder after integer division)
+arithmetic operator which adds two numbers together
+=arithmetic operator which increases a variable by a given amount
arithmetic operatorsymbol or characters used to perform a mathematical process on input data
6.5.2: be able to write programs that use relational operators (equal to, less than, greater than, not equal to, less than or equal to, greater than or equal to)
Programming
KeywordDefinition
!=relational operator which evaluates to True if two values are not equal
<relational operator which evaluates to True if the first value is less than the second
<=relational operator which evaluates to True if the first value is less than or equal to the second
==relational operator which which evaluates to True if two values are equal
>relational operator which evaluates to True if the first value is less than the second
>=relational operator which evaluates to True if the first value is greater than or equal to the second
relational operatorsymbol or characters which compare two values giving the result as a boolean True or False
6.5.3: be able to write programs that use logical operators (AND, OR, NOT)
Programming
KeywordDefinition
andlogical operator with two inputs which only evaluates to True if both inputs are True
boolean expressionquestion which has an answer of either True or False
logical operatorsymbol or character which can combine boolean expressions or values using AND, OR or NOT
notlogical operator which inverts a single boolean input from True to False or vice versa
orlogical operator with two inputs which evaluates to True if either or both inputs are True
6.6.1: be able to write programs that use pre-existing (built-in, library) and user-devised subprograms (procedures, functions)
Programming
KeywordDefinition
built-in subprograma type of pre-existing subprogram which you can use in python without having to import any modules or defining it yourself (e.g. input / print)
functiona type of subprogram which can have parameters by always returns a value
library subprograma type of pre-existing subprogram which you can use in python if you import a module (e.g. random or turtle)
pre-existing subprograma subprogram which you can use with python without having to define it yourself (e.g. built-in or library subprogram)
procedurea type of subprogram which can have parameters but never returns a value
subprogrameither a procedure or function (a named section of code that can be called multiple times)
user-devised subprograma type of subprogram which you have defined in your own python code using def
6.6.2: be able to write functions that may or may not take parameters but must return values, and procedures that may or may not take parameters but do not return values
Programming
KeywordDefinition
functiontype of subprogram which always returns a value
parameterdata passed into a subprogram to customise how it works
proceduretype of subprogram which never returns a value
return valuedata passed out of a function back to the part of code which called it
subprogrameither a procedure or function (named section of code which can be customised with parameters and called multiple times)
subprogram callpart of the code which causes a subprogram to actually run
subprogram definitionpart of the code which tells the code what to do when a subprogram runs
6.6.3: understand the difference between and be able to write programs that make appropriate use of global and local variables
Programming
KeywordDefinition
global variabletype of variable which can be accessed from any block of code in a program
local variabletype of variable which can only be accessed from within the scope of a subprogram or block of code
parametervalue passed into a subprogram which then behaves like a local variable for the scope of that subprogram
scopethe block(s) of code where a variable can be accessed (either global or local)
variablenamed memory location which can store a value which can change when the program runs