Chapter 8 Flashcards

(27 cards)

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

Data types

A

string; any characters including letters, numbers, and/or symbols integer; whole numbers real; decimal number single; decimal number double; decimal number boolean; true or false char; a single character

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

Data type

A

Characteristics of a piece of data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
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
8
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
9
Q

Concatenation

A

Joining two or more strings together

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
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
11
Q

Arithmetic operator

A

A symbol that performs a mathematical function (including DIV and MOD)

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

Sequence

A

The first of three programming constructs. Instructions are run in the order theyre written

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

Selection

A

The second of three programming constructs. A condition is checked and this determines which code is run or not run. IF statements and CASE statements.

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

Logical operators

A

A symbol that performs a comparison resulting in true or false. <>, <=, >=,…

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

Boolean operator

A

A symbol that joins many logical comparisons, can be AND, NOT or OR

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

Iteration/loop

A

The third of three programming constructs. Code is run multiple times, either a finite number of times (Count controlled), until a condition is true(Post condition), or while a condition is true(pre condition)

17
Q

Nested statement

A

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

18
Q

Subroutine

A

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

19
Q

procedure

A

A subroutine that doesnt return a value to the program that called it

20
Q

function

A

A subroutine that returns a value to the program that called it

21
Q

Parameter

A

A value that is sent to a subroutine

22
Q

Scope

A

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

23
Q

Global scope

A

The variable or constant can be accessed from anywhere in the program

24
Q

Local scope

A

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

25
Library routine
a pre written subroutine that can be called from within a program (ROUND, RANDOM)
26
Maintainable program
A program that has key features to help it be understood at a later data
27
How to have a maintainable program:
Meaningful identifiers, comments(text within a program to define its function, not executed when the program is run), subroutines(help to reduce redundant code, can be reused in the program, help to split the code down into sections)