SLR8 Flashcards

(6 cards)

1
Q

what is a subroutine

A

a block of code that is given a unique name within a program

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

why are subroutines used

A

they break up the program allowing code to be reused which makes it easier to debug

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

what are the 2 different types of subroutine

A

Procedures and functions

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

what is a procedure

A

a block of code that carries out a specific task

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

what is a function

A

a block of code that returns a value

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

what are the 3 main programming constructs

A

Sequence
selection
iteration

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