Chapter 8 Flashcards
What is a Variable?
A named memory location that can store data. The data can change whilst a program is running
What is a Constants?
A named memory location that can store data. The data cannot change whilst a program is running
What is a identifier?
The name given to a variable, constant, data structure (e.g. array) or subroutine
What is a sequence?
A series of statements that are executed once, in the order they are written
State the two forms of selection.
IF STATEMENT
CASE STATEMENT
State the three iterations of loops. give loop name for each one.
Count - Controlled —- For loop
post - condition ——— While loop
pre - condition ———–Repeat untill Until loop
What is a Parameter?
It is a value that is sent to a subroutine
State the Difference between Procedures and functions.
Procedures do not return a value to the program that called it while Functions do return a value to the program that called it
Why use subroutines?
The subroutine can be called when needed
The subroutine can be passed data to use in comparisons or calculations
There is only one section of code to debug
There is only one section of code to update
What is Global Scope?
a variable or constant can be accessed from any part of the program
What is Local Scope?
a variable or constant can only be accessed in the subroutine it is declared within
What is a Maintainable program?
A program that contains key features to help it be understood at a later stage