Programming Contrstucts Flashcards
(11 cards)
Define a Variable
A named location in computer memory used to hold data when a program is running. The value of the variable can change while the program is running
Define a Constant
A named location in computer memory used to hold data when a program is running. The value of the variable cant change while the program is running and remains constant
Define a Boolean operator
An operator that allows conditions to be combined then evaluated , the outcome is a Boolean variable
Define a Arithmetic Operator
Enables arithmetic operations to be carried out using variable
+,-,*
Define an Input Statement
A statement used to capture data which is to be used in the program
Define an Output Statement
A statement used to output data and information from the program
Define an Assignment Statement
A statement that assigns a value to a variable, constant or other data structure
A= b+c
What are the three program control structures
Sequence
Selection
Iteration
Define Sequence
denotes the order in which the instructions are carried out by the computer
Describe Selection
In selection a condition is used to decide which piece of code should be executed.
This is acheived through the use of IF statements and BOOLEAN operateors
Describe Iteration
another word for reptation
Repetitions is used when a section of code is to be carried out more than once
This can be acheived throihh loops