CS Key Terms Flashcards

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

Iteration

A

A block of code is executed repeatedly, either until a condition is met or for a set number of times.

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

Statement

A

Any individual step/instruction in the code

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

Assignment

A

Assignment is used to set the value of a variable, e.g. x := 5; (Usually described as X becomes equal to 5). The variable is written on the left and the value on the right. Do not confuse this with the equalities operator seen below.

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

Serial files

A

Data is stored in the file in the order in which it was entered. New data is appended to the end of the file.

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

Sequential files

A

The data is sorted according to a key field. New data is inserted in the correct position.

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

Watches/variable checks

A

Outputting the value of variables at specified points in the program, or when they change.

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

Translator diagnostics

A

Messages generated by the translator when converting the code to executable code. Helpful in finding syntax errors and some logic errors. Sometimes the line the error is reported on is not accurate.

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

Logic error

A

The code as it is written does something which is different from what the programmer intended. Usually detected while testing, as the program produces an incorrect result.

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

String

A

Textual data in the form of a list of characters, for example words and punctuation. String data is made up of character data and will usually vary in length.

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

Sequence

A

Executes each statement once, in the order in which it is given.

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

Subroutines

A

A sub-program, a set of statements written to perform a given task as part of solving the main problem. It can be called using its identifier.

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

Function

A

Specifically a subroutine which returns a single value and can therefore be used as if it were a variable.

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

Parameter/argument

A

Data item being supplied to a function or procedure when it is called

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

Pseudo code

A

A method of writing an algorithm using normal language which will mimic the programming code, but without worrying about specific syntax. It is useful for planning programs or explaining them to other people.

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

Indentation

A

Every time a new line of code is placed within a programming construct, e.g. If statement, the code should be intended to show that it exists within that structure. This makes it clear where each structure starts and finishes.

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

Initialising variables

A

This means giving variables a starting value, to ensure it starts at the right value or doesn’t hold a junk value from memory. Typically 0, “” or false, although could be a more specific value depending on the program.

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

Syntax error

A

The statement in the code does not follow the rules of the language. Usually detected by the translator, as the statement cannot be understood and translated.

18
Q

Run-time error

A

The program attempts an impossible operation (such as division by zero, accessing a missing file, etc.). Usually detected while testing, as the program crashes.

19
Q

Stepping

A

Executing the code a line at a time after a break point has been specified. Useful to check variables and see what individual lines of code are doing to locate logical errors.

20
Q

Dry run

A

The programmer goes through the code line by line as the computer would, often using a trace table to keep track of variables to check that the code performs as expected.

21
Q

Break points

A

Causing the program to halt at a specified marker. The programmer can then check the values of variables, and step through the code (execute the code one line at a time).

22
Q

Reserved words

A

Words which are reserved for a specific purpose in the programming language, e.g. IF… WHILE… DO…

23
Q

Commenting

A

Explaining a section of code with normal language in order to make it more understandable for other people. Comments should be made when the code is written and not after it has been written.

24
Q

Procedure

A

A subroutine which performs a task, but has no return value

25
Q

Transparency

A

Transparency in code is achieved by giving variables, constants, functions and procedures suitable names. This makes it easier for someone else to read the code and understand the purpose of those features.

26
Q

Boolean

A

Can only hold two possible values e.g. True or False, Yes or No

27
Q

Variable

A

The identifier associated with a particular memory location used to store data. By using a variable you can store, manipulate and retrieve data without knowing what the data will be, e.g. var x := integer

28
Q

Time

A

Used to store only real Times e.g. 12:42 but not 25:61

29
Q

Date

A

Used to store only real Dates e.g. 20/01/2010 but not 32/14/2011

30
Q

Char

A

Any single character represented by the codes from the character set in use on the computer.

31
Q

Integer

A

Any whole number, negative or positive e.g. 1, 34, 234564, -14 (there is a maximum value for each computer)

32
Q

Equality

A

Used to check whether two values are equal e.g. x = 5 (Described as x is equal to 5). This would usually be seen as a condition in an IF statement or the end condition of a loop.

33
Q

Array

A

An array contains several items of data, of the same type, grouped under one identifier. Each item in the array (element) has an index which allows that specific element to be access.

34
Q

Recursion

A

Recursion is when a subroutine (a procedure or a function) calls itself. The recursive subroutine is executed as normal until it gets to the line where it calls itself. At this point the subroutine is paused and a new call to the same subroutine is started. This will continue until an end condition is reached or the computer runs out of memory.

35
Q

Nesting

A

Placing one or more programming constructs inside another.

36
Q

Identifier

A

The specific name of a variable, procedure or function within a program

37
Q

Selection

A

A comparison determines whether a block of code will be executed or not. Examples: if statement, case/switch statements

38
Q

Constant

A

A data item with a fixed value. It cannot be changed when the program is executed, e.g. const pi := 3.1416

39
Q

Real

A

Any number represented with a fractional part, e.g. 3.1416, -123.34

40
Q
A