paper 1 definitions

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/62

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

63 Terms

1
New cards

Algorithm

A sequence of steps that can be followed to complete a task.

2
New cards

Decomposition

Breaking a problem into a number of sub-problems, so that each sub- problem accomplishes an identifiable task, which might itself be further subdivided.

3
New cards

Abstraction

The process of removing unnecessary detail from a problem.

4
New cards

Pseudo-code

Precise, English-like description of an algorithm. It has no specific syntax, so input name and if name is bob are valid instructions.

5
New cards

Flowchart

A visual representation of an algorithm using specific shapes including rectangle, diamond and parallelogram.

6
New cards

IPO

Where inputs, processing and outputs are taking place within an algorithm.

7
New cards

Linear search

A searching algorithm which looks at every element in turn until it finds the target, it is slow but works even on unsorted data

8
New cards

Binary search

A searching algorithm that divides the search space in half each time until it finds the target, faster than linear but requires the array to be sorted

9
New cards

Merge sort

A very efficient sorting algorithm that repeatedly breaks down a list into smaller lists, then repeatedly merges them back together in order

10
New cards

Bubble sort

A sorting algorithm that passes over the list many times, swapping adjacent items if they are in the wrong order. Not very efficient.

11
New cards

Integer

The data type of a whole number e.g. 5, 999 or -4

12
New cards

Real

A data type also called floating point numbers, they have a decimal part, for example 1.5, 0.935 or the value of Pi

13
New cards

Boolean

This data type has only two values, TRUE and FALSE

14
New cards

Character

The data type of a single character e.g. "A" or "$"

15
New cards

String

This data type stores a series of characters, e.g. "Zak", "MK44 5AB" or "123456789"

16
New cards

Variable

A named memory location holding a single value that can change during the program, e.g. name, age, x, y

17
New cards

Constant

It cannot change. A named memory location for something that stays the same. Examples are PI, NumberofLevels, MAXHEALTH

18
New cards

Assignment

A statement that assigns a value to a variable. The right side of the equals sign can be any expression. These are valid: health ← 100 fare ← 5 + 0.5 * miles

19
New cards

Sequence

A programming construct where instructions follow, one after the other

20
New cards

Iteration

A code construct where the instructions repeat. Can be definite/count-controlled or indefinite/condition-controlled.

21
New cards

Selection

A programming construct where the code makes a decision, and takes one of several branches, usually coded with IF-THEN-ELSE

22
New cards

Subroutine

A small set of instructions that completes a specific task, sometimes called a subprogram. It can be a function or procedure

23
New cards

Procedure

A subroutine which does not return a value. For example it might redraw the screen or write a record to a file

24
New cards

Function

A subroutine which returns a value. It might return a random dice roll, calculate a ticket price or determine your exam grade

25
New cards

Definite iteration

Repeats instructions a set number of times, also called "count-controlled". Uses a FOR loop in most high-level languages

26
New cards

Indefinite iteration

Repeats instructions a until a condition is met, also called "condition-controlled". Uses WHILE or REPEAT… UNTIL in high-level languages

27
New cards

For loop

This statement starts a definite iteration with the amount of iterations at the start, it will run a set number of times.

28
New cards

While loop

This statement starts a condition-controlled loop with the condition at the start, so the loop will only begin if the condition is true

29
New cards

Repeat until

A statement that starts a condition-controlled loop with the condition at the end in an UNTIL statement, it will run once even if the condition is false

30
New cards

Nesting

Coding a second programming construct inside the first. You can do this with selection and iteration

31
New cards

Identifier names

The name we give to variables, constants and subroutines, it should be meaningful

32
New cards

Real division

The arithmetic operator that divides one operand by another e.g. total / 7

33
New cards

Integer division

Or floor division, the quotient arithmetic operator divides operands giving only the whole number result. E.g. 9 DIV 4 = 2. Python uses // for this.

34
New cards

Remainders

The amount left over when one number is divided by another. Calculated with the MOD operator. Python uses % for this.

35
New cards

NOT

Boolean operator that negates its operand, meaning True becomes False and vice versa

36
New cards

AND

Boolean operator that returns a true value only if both operands are true

37
New cards

OR

Boolean operator that returns a true value if either operand is true

38
New cards

Array

A data structure that stores many data items of the same data type, can be one-dimensional, two-dimensional or more. (In Python we use a list for this)

39
New cards

Record

A collection of related data items called fields, often stored as a row in a database, it represents something in the real world like a person or product

40
New cards

String length

A function that determines how long a string is, i.e. the character count

41
New cards

Character position

A function that returns the numeric location of a character within a larger string (counting from 0)

42
New cards

Substring

A function in pseudo-code that returns part of a string when we pass it a starting position and length

43
New cards

Concatenation

Joining two strings together, usually uses the + operator, for example fullname = firstname + lastname

44
New cards

Character code

The numeric value of a character in a the character set. In ASCII, "A" is 65

45
New cards

Parameters

A variable declared in a subroutine definition, a and b are parameters in this code: SUBROUTINE add(a, b) result ← a + b RETURN result ENDSUBROUTINE

46
New cards

Return

A value which is given back to the section of code that calls a function.

47
New cards

Local

Variables with limited scope, they are usually deleted when the subroutine ends, thus saving memory and preventing errors

48
New cards

Global

Variables of this type remain in memory even when a subroutine ends, their scope is the whole program

49
New cards

Syntax error

An error because the rules of the language have been broken, such as forgetting a bracket or mis-spelling a keyword

50
New cards

Logic error

An error that occurs when code runs but produces unexpected results. E.g. adding instead of subtracting or stopping a loop too soon. It is detected by systematic testing with a trace table

51
New cards

Run-time error

An error that occurs when the code runs but fails during the operation. Usually caused by file handling problems or data types being incorrect.

52
New cards

Testing

The systematic process of running a program repeatedly with different input data and checking the output is as expected, revealing errors

53
New cards

Normal data

Test data that is expected or typical, e.g. the code if age < 18 then might be tested with data of 14

54
New cards

Boundary data

Extreme test data at the edges of the valid range. Phone battery percentage must be between 0 and 100, so these test data values would be -1, 0, 100 and 101

55
New cards

Erroneous data

Data of the wrong type or outside the expected range. For example a string where a number is expected, or an angle of 400 degrees. The program should reject this but not fail

56
New cards

Low-level language

Programming languages which are a much closer representation to the instruction set of the processor. These include assembly language and machine code.

57
New cards

High-level language

Programing languages designed to make it easier for humans to understand and write computer programs, than using low-level languages. Examples include Python and C#.

58
New cards

Machine code

A low-level language which the CPU can process directly, and consists of only binary codes which are very hard to write directly, to change and to debug

59
New cards

Assembly

A low-level language which uses mnemonics such as LDA, ADD to represent machine code instructions

60
New cards

Translator

A program which converts source code into code which the processor can execute, this can be a compiler, interpreter or assembler

61
New cards

Interpreter

This translator converts a high-level language into machine code one line at a time and then executes it, it's slower but interpreted code is quicker to write and easier to update

62
New cards

Compiler

A type of translator which converts a high-level language in to machine code all at once

63
New cards

Assembler

A type of translator which translates assembly language in to machine code