2.1 Flashcards

1
Q

What is computational thinking?

A

Formulating a problem and expressing its solution in such a way that a computer can carry out.

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

What are the 3 basic steps of computational thinking?

A

Abstraction
Decomposition
Algorithmic thinking

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

What is abstraction?

A

Identifying the key parts of the problem and hiding those that aren’t important so that it becomes easier to solve.

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

What is decomposition?

A

Breaking down a complex problem into smaller, more manageable parts which are easier to solve.

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

How do you carry out decomposition?

A
  • Identify the main problem
  • List the main components, functions or tasks
  • Break down these into smaller smaller tasks which can be completed separately
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is algorithmic thinking?

A

The consideration that goes into how to solve a problem using one or more algorithms.

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

What is an algorithm?

A

The series of steps that a program needs to perform to solve the problem.

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

What is a structure diagram used for?

A

To show the structure of a problem, its subsections and links to other subsections.

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

What are flowcharts?

A

Useful tools that can be used to develop solutions to a problem.

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

What is a trace table used for?

A

To show how the values of variables change during the execution of a program.

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

When does a syntax error occur?

A

If a statement is written that doesn’t obey the rules of the programming language.

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

When does a logic error occur?

A

If the program doesn’t do what the user intended.

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

How does a binary search work?

A

It searches a list by repeatedly dividing in half the portion of the list that could contain the required data item.

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

How does a linear search work?

A

Each item is checked one by one for the desired item

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

How does a bubble sort work?

A

It repeatedly goes through the list to be sorted and sorts it by swapping adjacent elements if they are in the wrong order

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

How does a merge sort work?

A

In the first stage, the list is divided in half repeatedly until each element has its own list. In the second stage, each set of sub-lists is repeatedly merged to produce a sorted list.

17
Q

How does an insertion sort work?

A

Starting with the second item in the list, it looks at each remaining item and places it in the correct position in the list.

18
Q

Evaluate a binary search?

A

Only works on a sorted list

19
Q

Evaluate a linear search?

A

Slow in a large list, but can be used on unsorted lists

20
Q

Evaluate a bubble sort?

A

Can be used at any time and is easy to program but is very inefficient for large data sets

21
Q

Evaluate a merge sort?

A

Very fast, especially with larger data sets

22
Q

Evaluate an insertion sort?

A

More efficient than the bubble sort, especially in smaller data sets as it skips the sorted values