Algorithms 2.1 Flashcards

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

Define Computational Thinking

A

The thought processes involved in formulating a problem and expressing its solution(s) in such a way that a computer—human or machine—can effectively carry out.

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

Give 2 examples of computational thinking

A

Could be solving a jigsaw puzzle or playing with lego.

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

Define abstraction

A

Removing unnecessary details and keeping only relevant ones.

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

Give an example of abstraction

A

Sat-nav

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

Define decomposition

A

The process by which a complex problem or system is broken down into parts that are easier to conceive, understand, program and maintain

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

Give an example of decomposition

A

Getting to school

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

Define algorithmic thinking and give an example

A

A way of getting to a solution by identifying the steps needed. An example of this is solving a math problem.

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

Define a syntax error and identify an example of one in programming.

A

An input by the programmer/user that does not comply with the laws of that programming language. e.g. pRint(). To fix them just change the statement so it follows these laws.

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

Define a logic error and identify an example of one in programming.

A

An error in the program that does not stop the program but produces an unexpected output. An example of this could be using + instead of - or using // instead of /.

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

Terminal symbol and its purpose

A

An oval - indicates the beginning and end of a program.

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

Input/output symbol and its purpose

A

A parallelogram - identifies any input needed and when output is displayed.

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

Process symbol and its purpose

A

A rectangle - marks when a calculation or a process is carried out.

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

Subroutine symbol and its purpose

A

a rectangle with tramlines at either ends - used when a subroutine is needed that is not part of the main program.

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

A decision symbol and its purpose

A

a rhombus - acts as an if statement in the program.

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

line symbol and its purpose

A

An arrow - shows the direction of code flow.

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

Step by step how to complete a trace table

A

Create a column of each variable in the program and any inputs and outputs. When the state of a variable changes, mark that value in a new row under that column and mark and output taken. Work through the program like a computer would do until the program ends. This allows you to check for any logic errors in your program.

17
Q

Define a trace table

A

A technique used to test algorithms, in order to make sure that no logical errors occur while the algorithm is being processed.

18
Q

How to identify an input

A

look in the program for an input statement showing what data type it is and what input message is being displayed.

19
Q

How to identify a process

A

see if the variable name for an input or a value changes in the program. This is usually a calculation.

20
Q

How to identify an output

A

look for a statement that includes the following:

print()
output
return

21
Q
A