Back to marketplace

2.2.1 Programming Techniques

No description yet. This curated deck is ready for daily study.

Total cards: 24•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (24)

#1
Front (Question)

Name 3 programming constructs.

Back (Answer)

Sequence Selection Iteration

#2
Front (Question)

What is meant by sequence?

Back (Answer)

Code is executed line-by line from top to bottom

#3
Front (Question)

What is meant by selection?

Back (Answer)

Particular block of code is run if a specific condition is met

#4
Front (Question)

Which statements are examples of selection?

Back (Answer)

If Else

#5
Front (Question)

Name the 2 types of iteration.

Back (Answer)

Count-controlled Condition-controlled

#6
Front (Question)

What is meant by count-controlled iteration?

Back (Answer)

Block of code executed a certain number of times

#7
Front (Question)

What is meant by condition-controlled iteration?

Back (Answer)

Block of code executed while a condition is met

#8
Front (Question)

Which loops are examples of iteration?

Back (Answer)

For While

#9
Front (Question)

What is recursion?

Back (Answer)

A programming construct in which a subroutine calls itself during its execution

#10
Front (Question)

How long does recursion continue?

Back (Answer)

Until a stopping condition is met

#11
Front (Question)

Give 2 advantages of recursion.

Back (Answer)

Can be represented in fewer lines of code Easier to express some functions recursively

#12
Front (Question)

Give 2 disadvantages of recursion.

Back (Answer)

Risk of stack overflow if memory runs out Difficult to trace

#13
Front (Question)

Which two ways can variables be defined?

Back (Answer)

Within a global scope Within a local scope

#14
Front (Question)

What is meant by scope?

Back (Answer)

The section of code in which a variable can be accessed

#15
Front (Question)

Where can local variables be accessed?

Back (Answer)

Only within the subroutine in which they are defined

#16
Front (Question)

Where can global variables be accessed?

Back (Answer)

Across the whole program

#17
Front (Question)

What are 2 benefits of local variables?

Back (Answer)

Ensures subroutines are self-contained Multiple local variables with the same name can exist in different subroutines

#18
Front (Question)

What are 2 disadvantages of global variables?

Back (Answer)

Requires more memory as not deleted until program terminates, local variables are deleted once the subroutine ends Danger of being unintentionally edited

#19
Front (Question)

What is modular programming?

Back (Answer)

A technique used to split large, complex programs into smaller, self-contained modules

#20
Front (Question)

Give 3 benefits of using modular programming.

Back (Answer)

Improves reusability of components Simplifies testing & maintenance Easier project management

#21
Front (Question)

What is stepwise refinement / top-down design?

Back (Answer)

Technique used to modularise programs by breaking down problem into sub-problems until each is an individual, self-contained module performing a certain task

#22
Front (Question)

What is a function?

Back (Answer)

Named block of code that performs a specific task Always returns a single value

#23
Front (Question)

What is a procedure?

Back (Answer)

Named block of code that performs a specific task Do not have to return value

#24
Front (Question)

State the two methods by which parameters can be passed.

Back (Answer)

By reference By value