2.2.1 Programming Techniques Flashcards

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

What is sequence?

A

When the lines of code are executed in order. The order of the lines of code is important as something can’t be called before it is referenced. e.g. a variable

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

What is selection?

A

Used to decide which section of code should be run depending on a conditional statement.

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

What operators can be used for comparison?

A

==
=!
<
>
>=
<=

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

What is iteration?

A

Repeating sections of code where the same lines of code can be executed multiple times.

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

What loops are involved in itteration?

A

FOR
WHILE
DO

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

What are FOR loops?

A

used for repeating sections of code for a known number of times - although this can be changed by using a variable - but the lines will only repeat for that number of times.

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

What are WHILE loops?

A

Conditional loops - the loop is only exeted when the condition is met.

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

What are DO loops?

A

Similar to a while loop but the condition is checked at the end of the section so that the code is always executed at least once.

DO x ….[CODE]…. UNTIL y

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

What is branching?

A

Jumping to other sections of code dependant on a condition. used within an if statement.

if x == y:
goto 2

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

What is a subroutine?

A

;ji;

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