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
What is an Integer?
A data type used to store positive and negative whole numbers
What is a Real?
A data type used to store numbers with a fractional part
(decimals)
What is a String?
A sequence of characters often stored as a variable in a computer program
Can include numbers, letters and symbols
What is a Constant?
A value that cannot change while a program is running
What is a Function?
A section of code that may take parameters that can be called by another part of the program with the purpose of returning a value
can create self-contained reusable program components that can eliminate code duplication
What is a List?
A set of data items of the same type grouped together using a single identifier
A dynamic data structure
What is a Procedure?
A routine within a larger program that can take parameters
Used to produce structured code
Does not return a value
makes it easier to read and debug programs
What is SQL?
Structured Query Language
A language to return, define and manipulate records in a database
Includes commands: SELECT, FROM, WHERE etc.
What is the SQL command “FROM”?
SQL command to signify which table(s) to return data from
What is the SQL command “SELECT”?
SQL command to signify which fields to return
What is the SQL command “WHERE”?
SQL command to filter the results of a query
What is String Manipulation?
Commands that extract or change characters in strings
e.g. LENGTH, LEFT, RIGHT, SUBSTRING, UPPER, LOWER, ASC, CHAR etc.
What is a Subroutine?
A block of reusable code given a unique identifiable name within a program
Supports code reuse and program maintenance
Also called a subprogram, includes functions and procedures
What is a zero-indexed array?
The first element is stored at index 0
Array is an area of memory, used to store variables of the same type