9.1 Algorithmic thinking Flashcards

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

1.1 What is an algorithm?

A

A sequence of instructions to solve a problem or achieve a goal.

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

1.2 What is searching?

A

Searching is where the programs checks through a list looking to find a piece of data. (E.g. looking for a name in a list.)

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

1.3 How does a linear search work?

A

A linear search starts with the first item in the list and checks each one in turn to see if it matches the data being searched for.

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

1.4 How does a binary search work?

A

A binary search checks the middle value in the list. If that middle item is higher than the search value it disregards the top half of the list. Then it checks the middle of the remaining values. This process repeats until the value is found, or no data remains.

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

4.1 Pseudocode definition

A

Pseudocode is a way to design algorithms. It uses commands which are similar to those in a computer program, but is not as rigid, as it is only intended for planning the steps involved.

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

4.2 Why won’t pseudocode run on a computer?

A

Pseudocode is a design tool. Just like you can’t drive the design of a car or live in an architect’s design of a house.

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

4.3 Trace table definition

A

A trace table is used to test if an algorithm written in pseudocode works properly.

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

4.4 Why do you need trace tables?

A

Because pseudocode is not a working computer program, you cannot run it to test it. Instead you follow the pseudocode, writing down the values it generates and outputs.

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

2.1 Input

A

Identifier ß USERINPUT

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

2.2 Output

A

OUTPUT “Data” + variable

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

2.3 Assignment

A

identifier ß data

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

2.4 Selection

A

IF condition THEN

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

2.5 Count controlled iteration

A

FOR i ß 1 to 10

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

2.6 Condition controlled iteration

A

WHILE condition

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

2.7 Arithmetic

A

+ - * /

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

2.8 Relational operators

A

< > = ≤ ≥ ≠

17
Q

2.9 Random Number Generation

A

RANDOM_INT(int, int) (Ints are inclusive lower and upper bounds)