Chapter 8 - Programming Flashcards
What is a variable
Named data store that may change the execution of a program
What is a constant
Named data store that contains a value that does not change during the execution of a program
What are the 5 basic concepts of programming
Data use
Iteration
Sequence
Selection
Operator use
What is data use
Variables, constants and arrays
What is sequence
The order of steps in a task
What is selection
Choosing a path through a program
What is iteration
Repitition of a sequence of steps in a program
What is operator use
Arithmetic for calculations
Logical and boolean for decisions
What does the different data types enable(3)
Data to be stored appropriately
Data to be effectively manipulated
Automatic validation
What are the 5 basic data types
Integer
Real
Char
String
Boolean
What is boolean
A variable constant that can only have 2 values
TRUE or FALSE
What is a string
A variable/constant that is several characters in length or has no characters which is an empty string
What does it mean if a number is stored in a string
The number cannot be used ofr calculations
What is a char
A variable/constant that is a single character
What are the basic concepts to be used when solving a problem (6)
Sequence.
Selection.
Iteration.
Counting and totalling.
String handling.
Use of operators.
Declare
To define the value and data type of a variable or constant
Iteration
Section of programming code that can be repeated under certain conditions
Operator
Special character/word in a programming language that identifies an action to be performed
Arithmetic operator
An operator that is used to perform calculations
Logical operator
Operator that is used to decide the path to take through a program if the expression formed is true or false
Boolean operator
Operator that is used with logical operators to form more complex expressions
Nesting
The inclusion of one type of code construct inside another
Procedure
Set of programming statements grouped together under a single name which can be called to perform a task in a program rather than including a copy of the code every time the task is performed
Function
Set of programming statements grouped together under a single name which can be called to perform a task in a program rather than including a copy of the code every time the task is performed and returns a variable back to the main program
Global variable
variable that is declared outside a user defined function
Local variable
variable declared inside a user defined function