Ch.8 Programming Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

variable

A

a named memory location that can store data
the data can change whilst a program is running

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

constant

A

a named memory location that can store data
the data cannot change whilst a program is running

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

identifier

A

a name given to a variable, constant, data structure or subroutine

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

assignment

A

a type of programming statement that stores data in a variable or constant

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

string

A

a data type (any characters including letter, numbers and/or symbols)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

data type

A

the characteristics of a piece of data
common data types: string, integer, real, boolean

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

integer

A

a data type (whole numbers)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

real

A

a data type (decimal numbers)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

single

A

a data type (decimal numbers)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

double

A

a data type (decimal numbers)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

boolean

A

a data type (true or false)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

char

A

a single character
e.g. “A”, “1”, “*”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

casting

A

converting data from one data type to another data type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

output

A

data that is displayed to the user usually on-screen

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

concatenation

A

joining two or more strings together

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

input

A

the user entering data into the program, usually from a keyboard

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

arithmetic operator

A

a symbol that performs a mathematical function
e.g. “+” adds two values together

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

MOD

A

remainder division
the remainder after the division is performed
e.g. MOD(5,2) = 2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

DIV

A

integer division
the remainder from the division is ignored
e.g. DIV(5,2) = 2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

parentheses

A

brackets in a mathematical statement
determine which calculations are performed first

21
Q

sequence

A

a programming construct
instructions are run once and in the order they are written

22
Q

selection

A

a programming construct
a condition is checked and this determines which code is run, or not run

23
Q

IF statement

A

a type of selection construct where the result of the condition is either true or false

24
Q

CASE statement

A

a type of selection construct where there is a list of different values to compare a single value against

25
Q

logical operator

A

a symbol that performs a comparison resulting in true or false

26
Q

boolean operator

A

a symbol that joins multiple logical comparisons
e.g. AND, OR, NOT

27
Q

AND operator

A

returns true when both inputs are true

28
Q

NOT operator

A

returns true if the input is false, and false if it is true

29
Q

OR operator

A

returns true when one, or both, inputs are true

30
Q

iteration

A

a programming construct
code is run multiple times

31
Q

loop

A

a type of iteration
code is run a finite number of times, usually a for loop

32
Q

count-controlled loop

A

a type of iteration
code is run a finite number of times, usually a for loop

33
Q

pre-condition loop

A

a type of iteration
code is run while the condition is true
the condition is checked before running any code in the loop, so the code might never run

34
Q

post-condition loop

A

a type of iteration
code is run until a condition is true
the condition is checked after the code in the loop is run, so the code always runs once

35
Q

totalling

A

a type of program
adds up multiple values to find the total

36
Q

counting

A

a type of program
adds one for every item to find out how many there are

37
Q

nested statement

A

a construct (selection or iteration) that is inside another construct

38
Q

subroutine

A

a self-contained piece of code that has an identifier and can be called from elsewhere in a program

39
Q

procedure

A

a subroutine that does not return a value to the program that called it

40
Q

function

A

a subroutine that does return a value to the program that called it

41
Q

parameter

A

a value that is sent to a subroutine

42
Q

scope

A

the sections in the code where the variable, or constant, can be accessed

43
Q

global scope

A

the variable or constant can be assessed from any part of the program

44
Q

local scope

A

the variable or constant can only be accessed in the subroutine it is declared within

45
Q

array

A

a data structure where you can store multiple data items, of the same data type, under one identifier

46
Q

1-dimensional array

A

an array that has only one index

47
Q

index

A

the number of the space in the array

48
Q

2-dimensional array

A

an array that has two indices

49
Q

file handling

A

programming statements that allow text files to be opened, read from, written to and closed