2.2.1 programing techniques Flashcards

1
Q

Sequence

A

when code is executed line by line

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

Selection

A

A block of code is run if a specific condition is met, using IF statement.

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

Iteration

A

A block of code is executed a certain number of times or while condition is met.
FOR, WHILE or REPEAT loops.

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

types of iteration

A

Count controlled: iteration is repeated certain amount of times.
condition controlled: iteration continues until a given condition is met.

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

RECURSION

A

a programming construct in which subroutines calls it self until a certain condition is met.

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

advantages of recursion

A

recursion can be presented in fewer lines pf code, which make it less prone to errors.

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

disadvantages of recursion

A

inefficient use of memory, as the subroutine calls it self too many times.

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

Local variables

A

local variables can only be accessed within the block (subroutine) of code where they defined.

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

advantages of local variables

A

-multiple local variables with the same name can exist in different block of codes.
- using local variables ensure that subroutines are self contained, with no danger of variables been affected by codes outside the subroutine

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

Global variables

A

can be accessed across the whole program.
all variables used in the main body of program are considered global varibles

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

advantages of global variables

A

useful for values that need to be used by multiple parts of the program

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

IDE

A

integrated development environment.
a program which provide a set of tools to make it easier for the programmer to develop the code.

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

IDE stepping

A

this allows you to monitor the effect of each line by executing single line at a time.

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

IDE breaking point

A

IDE allows user to set a point in the program where the program will stop, it can be based on a condition or set to occur at a specific line

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

IDE Source code editor

A

The editor aims to make the coding process easier by providing features like autocompletion of words, indention and syntax highlighting

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

IDE debugging tools

A

some IDEs also provide run-time detection errors with a guide as to where in the code they likely to occur

17
Q

IDE variable watch

A

sometimes used to pinpoint errors, this is useful feature to observe how the content of a variable change in real time through execution of a program

18
Q

Parameter

A

parameter is a variable used in a function or procedure to receive input data. Parameters allow you to pass information to functions or procedures, enabling code to be more flexible and reusable.