2.2 – Programming fundamentals Flashcards
What is an Arithmetic Operator?
Symbol used in mathematical expressions to perform an action on two numbers (operands)
+, -, /, *, ^
What is an Assignment?
Giving a variable or constant a value
e.g. counter = 0
What is a Boolean Operator?
Operators used in conditions, such as AND, OR, NOT
e.g. IF choice < 1 OR choice > 3. The operators are < and >.
What is a Condition Controlled Loop?
Repeating instructions depending on a condition
e.g. WHILE x < 6.
What is a Count Controlled Loop?
An iteration which repeats instructions a fixed number of times
e.g. FOR counter = 1 TO 10
What are Inputs?
Any information or data which goes into a computer system
What is Iteration?
Code which is repeated a set number of times
Or a variable number of times based on the evaluation of a Boolean expression
condition controlled loop (e.g.WHILE)
counter controlled loop (e.g.FOR)//condition controlled loop (e.g.WHILE)
One of the three basic programming constructs
What is an Output?
Any data that leaves a system
What is Selection?
A decision point within a computer program
Evaluated by the ALU
One of the three basic programming constructs
What is Sequence?
Instructions executing one after another
One of the three basic programming constructs
What is a Variable?
A name for a memory location
Temporarily holds a value that can change while the program is running
What is Boolean?
A data type used to store one of two states, true or false
Or two states 0 and 1 or 0 and -1
Often translated to On/Off, Yes/No etc
What is Casting?
Converting a variable from one data type to another
e.g.variable entered as a string needs to be an integer for calculation
What is a Character?
A single alphanumeric
Includes letters a-z and A-Z, symbols e.g. #, @, ! & numbers 0-9.
What is a Data Type?
A definition of the characteristics of a data item
Better described w/ an example such as integer, real, character, Boolean