Algorithms Flashcards

1
Q

What is an algorithm?

A

It is a set of step by step instructions to solve a given problem.

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

What is pseudocode?

A

It is simplified half English, half code outline of a computer program/sequence of instructions.

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

Why would you use a flowchart and how would it help you?

A

It allows you to see problems before they arise. You can also clearly map out the problem you are trying to solve.

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

What does the start or stop mean in a flow chart?

A

It means the beginning and end points of a sequence.

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

What does process mean in a flow chart?

A

It means an instruction or command.

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

What does decision mean in a flow chart?

A

It means either yes or no.

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

What does input or output mean in a flow chart?

A

An input data is received by a computer. An output is a signal sent from a computer.

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

What does connector mean in a flow chart?

A

A jump from one point in the sequence to another.

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

What does directions of flow mean in a flow chart?

A

Connects the symbols. The arrow shows the direction of flow of instructions.

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

What are 3 ways you can tell a computer to organise a script?

A
  1. Sequencing
  2. Selection
  3. Iteration
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is sequencing?

A

It’s when the computer will run your code in order or one line at a time from the top to the bottom of your program. E.g. like command prompt. Everything is shown.

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

What is selection?

A

It’s when some lines of code are run but only if a condition is met, so some code is intentionally ignored. For example, IF else statements/switch statements. E.g. if over 18 selected show the adult web page. This is more complex than sequencing.

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

What is iteration?

A

This is when the computer executes the same lines of code several times. This is done using a loop. E.g. you have a video that plays every time someone visits your website you can specify how many times it plays.

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

What are the 3 types of loops in iteration?

A
  1. For loops
  2. While do loops
  3. Repeat loops
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are For Loops?

A

It’s used to repeat a specific block of code a known number of times. This is predetermined.

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

What are While Do Loops?

A

The loop is run until after a point is made. The While Do Loop comes after the action has happened.

17
Q

What are Repeat Loops?

A

Is used to execute one or more statements repeatedly some number of times.

18
Q

What does the term ‘variables’ mean?

A

It is a location in a computer’s memory that contains data. It is something that can change, it is not permanent. E.g. usernames. The data stored in %…% is a variable.