Revision tools
You can print this page for a quick reference guide or you can use the tools below to create printable test sheets
6a: Describe what algorithms and programs are and how they differ
Keyword | Definition |
---|
algorithm | step by step instructions to solve a problem (which might not be run on a computer) |
program | step by step instructions to solve a program (which can be run on a computer) |
6b: Recall how machines need translators for executing programs.
Keyword | Definition |
---|
high level programming language | a type of programming language where you can perform complex tasks with only a few instructions |
low level programming language | a type of programming language where you need lots of detailed instructions to perform even simple tasks |
machine code | code that is hard for humans to understand but can be easily understood by a computer |
program code | code that is designed to be easy for human programmers to understand but is hard for a computer to run in its current form |
translator | a software tool that is used to convert program code into machine code |
6c: Use an IDE to write and execute a Python program.
Keyword | Definition |
---|
debug | finding and fixing errors in code |
IDE | integrated development environment (program which gives you all the tools to write, run and debug a program) |
program | step by step instructions that can be run on a computer |
python | a high level text based programming language |
syntax | the rules of a programming language |
syntax highlighting | displaying code in different colours based on what each part of the code does |
6d: Locate and correct common syntax errors.
Keyword | Definition |
---|
brackets | syntax errors often occur if ( { and [ are missing matching ] } and ) |
debugging | finding and fixing errors in code |
indentation | syntax errors often occur if code has the wrong amount of tabs or spaces at the start of each line |
line numbers | each line of code has a number which can be used to help find errors |
syntax error | a type of error which prevents code from running at all because the rules of the programming language have been broken |
6e: Use simple arithmetic expressions in assignment statements to calculate values
Keyword | Definition |
---|
arithmetic expressions | combinations of variables, operators and numbers to calculate a value |
arithmetic operator | a mathematical symbol such as add (+), subtract (-), divide (/) or multiply (*) |
assignment statement | storing a value into a variable |
values | data such as a number |
variable | a named memory location which can store a value |
6f: Receive input from the keyboard and convert it to a numerical value
Keyword | Definition |
---|
character | individual letter, digit or symbol |
float | a number with a decimal point |
input | builtin python function which asks the user to type something in |
integer | a whole number (no decimal point) |
string | text made up of multiple characters |
6g: Use relational operators to form logical expressions
Keyword | Definition |
---|
!= | relational operator which means "not equal to" |
< | relational operator which means "less than" |
<= | relational operator which means "less than or equal to" |
== | relational operator which means "equal to" |
> | relational operator which means "greater than" |
>= | relational operator which means "greater than or equal to" |
logical expression | a value which can only be one of either true or false |
relational operator | symbol or symbols which are used to compare two values |
6h: Use binary selection (if, else statements) to control the flow of program execution
Keyword | Definition |
---|
elif | selection statement which will only run the next indented block if a previous condition has not been met but a different condition is met |
else | selection statement which will only run the next indented block if a condition has not been met |
if | selection statement which will only run the next indented block if a condition has been met |
indented block | lines of code which share the same amount of spaces or tabs at the start |
program flow | the order in which lines of code are executed in a program |
6i: Generate and use random integers
Keyword | Definition |
---|
import | instruction which tells python how to find and use an external module of code |
integer | a whole number |
parameter | data which is passed into a subprogram to customise how it works (e.g. minimum and maximum random numbers to choose between) |
random | a module which can be imported to tell python how to choose random numbers |
return value | data which is passed out from a function back to the code which called the function (e.g. a number chosen at random) |
6j: Use multi-branch selection (if, elif, else statements) to control the flow of program execution
Keyword | Definition |
---|
elif | selection statement which will only run the next indented block if a previous condition has not been met but a different condition is met |
else | selection statement which will only run the next indented block if a condition has not been met |
if | selection statement which will only run the next indented block if a condition has been met |
indented block | lines of code which share the same amount of spaces or tabs at the start |
program flow | the order in which lines of code are executed in a program |
6k: Describe how iteration (while statements) controls the flow of program execution
Keyword | Definition |
---|
condition | an expression which can contain values, variables and operators to calculate a value which is either True or False |
indented block | lines of code which share the same amount of tabs or spaces at the start |
iteration | running lines of code multiple times |
program flow | the order in which lines of code are executed |
while statement | form of iteration which runs an indented block of code repeatedly as long as a condition is met |
6l: Use iteration (for loops) to control the flow of program execution
Keyword | Definition |
---|
for loop | a type of iteration where an indented block of code is repeated a certain number of times |
indented block | lines of code which have the same number of spaces or tabs at the start |
index | a variable that is used to keep track as iteration loops through a range of values |
iteration | running an indented block of code multiple times |
program flow | the order in which lines of code are executed |
6m: Use variables as counters in iterative programs
Keyword | Definition |
---|
assignment | storing a value in a variable |
decrement | decreasing the value stored in a variable by 1 |
increment | increasing the value stored in a variable by 1 |
index | a variable that is used in a while or for loop to keep track of of how many times the loop has repeated |
iteration | repeating lines of code multiple times |
variable | a named memory location which can store a value which may change as a program runs |
variable identifier | the name of a variable which describes the value it stores |
variable value | the data stored in a variable |
6n: Combine iteration and selection to control the flow of program execution
Keyword | Definition |
---|
iteration | running instructions multiple times (in a loop) |
program execution | running a program |
program flow | the sequence (order) in which lines of code are executed |
selection | running instructions which determine which other instructions should be run next |
6o: Use Boolean variables as flags
Keyword | Definition |
---|
boolean flag | a variable which stores either True or False as a way of controlling a program (e.g. whether or not a player is still alive in a game or not) |
boolean value | either True or False |
variable | a named memory location which can store a value that might change when the program runs |
variable identifier | the name of a variable which should describe the data that it stores |
variable value | the data stored in a variable |