Key Definitions - 2.2 Flashcards
Variable -
Used within a computer program to store a single piece of data. The contents can be changed
Constant
Used within a computer program to store a single piece of data. The data does not change within the program (it remains constant)
Operator
Used within a program to represent an action e.g + which represents addition
Input
Data entered into a computer program
Output
Data sent out by the computer program
Assignment
When a value is set/given to a variable
Sequence -
When the code/instructions are all in order so that one piece of code executes followed by the next etc
Selection -
- when a choice/decision is used within a program, allowing for multiple outcomes dependent on the data that is inputted.
E.g if, else
Iteration
- When a section of code is repeated
Condition Controlled Iteration
This is a type of iteration, where the code is repeated until a certain condition is met. This means the code could execute any number of times, as it relies on the condition being met before stopping.
Count Controlled Iteration
This is a type of iteration, where the code is repeated a specific number of times. This means the code will only execute this number of times before stopping.
String
A data type which is used when storing alphanumeric characters and symbols. E.g. letters, numbers, #?!- etc.
String Manipulation
Refers to when a string is altered or edited to suit the means of the program.
String Concentation
Refers to when strings are brought together and combined.
String Splitting
Refers to when a string is split at specific points,
separating the single string into multiple strings.
Text File
Used to store data whilst the program is running.
Database -
Used to store large amounts of data beyond whilst the program is running. Offers a more secure way of storing data.
Record
Refers to all data stored about a single data subject within a table. Can often be seen as a single row within a table.
Field
Refers to the various categories for which data is collected. Can often be seen as a single column within a table.
SQL
Structured Query Language - the language used to manage, maintain and query a database.
SQL Query
Written to extract data from within a database.
SELECT
An element of a SQL query. Used to determine which field will be extracted.
FROM
An element of a SQL query. Used to determine which table the data will be extracted from.
WHERE -
An element of an SQL query. Used to set the criteria for the query. This element may not always come up in a question.
List
Used within a program. Allows you to store multiple pieces of data in the same location.
One Dimensional List
Stores one piece of data per data subject, identified using a single index.
Two Dimensional List
Stores multiple pieces of data per data subject,
identified using two indices.
Sub-Program
Used within a computer program. It is a section of code that is ‘called upon’ within a program when being executed. It allows for the same piece of code to be used without having to repeatedly write it out.
Argument
Data that is passed into a sub-program to be used within the sub-program.
Parameter
The variables that are passed into a sub-program to be used within the sub-program.
Function
A type of sub-program. A function is a sequence of instructions which return a value.
Procedure
A type of sub-program. A procedure is a sequence of instructions which do not return a value.
Data Type -
Refers to the way data is stored within a program. The data type determines what type of operations can take place on the data. There are 5 main data types (string, integer, Boolean, real/float, character)
Integer
A data type, used to store whole numbers.
Boolean
A data type, used to store a TRUE/FALSE value.
Real/Float
A data type used to store numbers that require decimal places.
Character -
A data type used to store a single character.
Casting -
Altering a variable’s data type within a program.
Arithmetic Operator
Refers to the various operators used to perform arithmetic calculations within a program (+, -, *, /)
DIV
Is short for Quotient, and is used to find the whole number of a division.
MOD
Is short for Modulus, and is used to find the remainder of a division.
Boolean Operator
Refers to the various operators used to perform comparisons on data within a program which provides more focused results (AND, OR, NOT).
Random
A function built into python which allows for random choices to be made, used during random number generation.