SLR8 Flashcards
(6 cards)
1
Q
what is a subroutine
A
a block of code that is given a unique name within a program
2
Q
why are subroutines used
A
they break up the program allowing code to be reused which makes it easier to debug
3
Q
what are the 2 different types of subroutine
A
Procedures and functions
4
Q
what is a procedure
A
a block of code that carries out a specific task
5
Q
what is a function
A
a block of code that returns a value
6
Q
what are the 3 main programming constructs
A
Sequence
selection
iteration