CT and Programming Flashcards

1
Q

What is the shape for a

start or end of the program

in a flowchart?

A

an oval

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

What is the shape for a

process

in a flowchart?

A

a rectangle

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

What is the shape for a

decision

in a flowchart?

A

a diamond

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

What is the shape for an

input or output

in a flowchart?

A

a parallelogram

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

What is the shape for a

subprogram

in a flowchart?

A

a rectangle with two rectangles either side

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

What is a

constant?

A

a memory location that holds a value that does not change when the program is run

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

Define

sequencing.

A

completing instructions in order, one after another

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

Define

selection.

A

choosing a path of instructions to follow based on a Boolean condition

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

What is

decomposition?

A

usually the first step in the problem-solving process, where the problem is broken down into smaller, more manageable parts which are then easier to solve

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

What are the positives of

decomposition?

(and subprograms in general) (3)

A
  • sub-problems can be worked on by different teams at the same time
  • it is easier to spot and correct errors
  • code can be reused
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is

abstraction?

A

the removal of unecessary detail in a problem

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

Define

data structure.

A

an organised collection of related elements

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

What does an

array do?

and give an example.

A

store data items all of the same data type

e.g.
[“Alice”, “Barry”, “Catherine”]
[75, 82, 45, 55]

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

What does a

record do?

and give an example.

A

stores a set of related elements of different data types

e.g.
[384, “Collins”, “Ivy”, 2010, 15.34]

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

What is a

field?

A

each element in a record

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

What are the

similarities and differences of iteration and repetition?

(1 of each)

A

+iteration and repetition both repeat a section of an algorithm
-iteration repeats for every item in a data structure whereas repetition repeats either a fixed number of time, or until a condition is met

17
Q

What are some examples of

input validation?

(4)

A
  • range check
  • length check
  • presence check
  • pattern check
18
Q

What are the

three broad categories of errors?

A
  • syntax errors
  • run-time errors
  • logic errors
19
Q

What is a

syntax error?

and what are some examples?

A

an error that breaks the rules of the grammar of the language

e.g. misspelled keywords, missing or excessive indentation

the computer cannot translate the code into machine code, and so cannot run it

20
Q

What is a

run-time error?

and what are some examples?

A

an error that causes a program to crash because it cannot execute one of the instructions in the code

e.g. divide by zero, index out of range

21
Q

What is a

logic error?

and what are some examples?

A

an error that causes incorrect or unwanted behaviours

e.g. wrong arithmetic operator or mixing up two variable names