2.2 Programming Fundamentals Flashcards
OCR GCSE Computer Science J277
Initialisation
Setting the initial value for a variable.
Variable
An identifier associated with an area of computer memory in which data is stored. The data can change during program execution.
Sequence
The order. A set of instructions that will be carried out, one after the other, in the stated order.
Constant
An identifier associated with an area of computer memory in which data is stored. The data CANNOT change during program execution.
Selection
A program control structure with a logical test, or sequence of tests, that evaluate(s) to True or False. It allows subsequent statements to be run selectively depending on the outcome of the test(s).
Condition
An expression that evaluates to True or False (such as within an ‘if’ statement)
Selection with multiple conditions
Multiple statements take the form of else if and act as additional conditions that are checked in the order in which they are written in the selection block
Expression
Combination of variables, constants, values, or operators that is evaluated to produce a result.
Loop
A sequence of instructions that is repeated. This can be a fixed number of repetitions (count-controlled loop) or the number of repetitions can be controlled by a condition (condition-controlled loop)
Integer
A whole number, such as 5. It can be positive or negative.
Integer Division / Floor Division / Quotient
A division where the quotient (result) is an integer and any remainders are discarded. The operator is often represented by the abbreviation DIV or in Python it uses the // sign.
Modulo operation
An operation that returns the remainder of a division. The modulo operator is often represented by the abbreviation MOD or in Python it uses the % sign.
Real / Float
Real is also referred to as float. Real numbers include numbers with decimal places. A real number can be positive or negative.
Boolean
The Boolean data type is based on logic and can have one of only two values, True or False
Char
Char refers to a single character. The character can be any letter, digit or symbol