Chapter 8 Flashcards
(27 cards)
Variable
A named memory location that can store data. The data can change whilst a program is running.
Constant
A named memory location that can store data. The data cannot change whilst a program is running.
Identifier
A name given to a variable, constant, data structure or subroutine
Assignment
A type of programming statement that stores data in a variable or constant
Data types
string; any characters including letters, numbers, and/or symbols integer; whole numbers real; decimal number single; decimal number double; decimal number boolean; true or false char; a single character
Data type
Characteristics of a piece of data
Casting
Converting data from one data type to another data type
Output
Data that is displayed to the user, usually on screen
Concatenation
Joining two or more strings together
Input
The user entering data into the program, usually from a keyboard
Arithmetic operator
A symbol that performs a mathematical function (including DIV and MOD)
Sequence
The first of three programming constructs. Instructions are run in the order theyre written
Selection
The second of three programming constructs. A condition is checked and this determines which code is run or not run. IF statements and CASE statements.
Logical operators
A symbol that performs a comparison resulting in true or false. <>, <=, >=,…
Boolean operator
A symbol that joins many logical comparisons, can be AND, NOT or OR
Iteration/loop
The third of three programming constructs. Code is run multiple times, either a finite number of times (Count controlled), until a condition is true(Post condition), or while a condition is true(pre condition)
Nested statement
A construct(selection or iteration) that is inside another construct
Subroutine
A self contained piece of code that has an identifier and can be called from elsewhere in a program
procedure
A subroutine that doesnt return a value to the program that called it
function
A subroutine that returns a value to the program that called it
Parameter
A value that is sent to a subroutine
Scope
The sections in the code where the variable or constant can be accessed
Global scope
The variable or constant can be accessed from anywhere in the program
Local scope
The variable or constant can only be accessed in the subroutine it is declared within