1/58
Vocabulary flashcards covering programming fundamentals for OCR GCSE Computer Science J277.
Variable
A named storage location whose value can change while a program runs.
Constant
A named value that should not change while a program runs.
Integer
A whole-number data type.
Real / float
A data type for numbers that can contain a fractional part.
Boolean
A data type with two possible values: True or False.
Character
A data type representing a single character.
String
A sequence of characters.
Casting
Converting a value from one data type to another.
Sequence
Programming construct where instructions execute in order.
Selection
Programming construct that chooses which instructions to execute depending on a condition.
Iteration
Repeating instructions using a loop.
Count-controlled iteration
A loop that repeats a known or specified number of times.
Condition-controlled iteration
A loop that repeats while or until a condition is met.
Arithmetic operators
Addition, subtraction, multiplication, division, integer division, remainder/modulo and exponentiation.
DIV / integer division
Division that returns the whole-number quotient.
MOD / modulo
Returns the remainder after integer division.
Comparison operator
Compares values and produces a Boolean result, such as equal to, not equal to, less than or greater than.
Boolean operators
AND, OR and NOT.
Assignment
Storing a value in a variable.
Input
Data entered into a program.
Output
Data or information produced by a program.
String concatenation
Joining strings together.
String length
The number of characters in a string.
Substring
A selected part of a string.
Useful string operations
They allow programs to examine, combine and manipulate text.
Array
A data structure that stores multiple values under one name, accessed using indexes.
One-dimensional array
An array arranged as a single list of elements.
Two-dimensional array
An array arranged using rows and columns.
Index
The position used to identify an element in an array or string.
Indexing in exam context
The starting index depends on the language or notation used; OCR Exam Reference Language uses specified conventions shown in its reference guide.
Record
A data structure that groups related fields about one item or entity.
Field
One individual piece of data within a record.
File
A collection of data stored so it can be retained after a program ends.
Reason programs use files
To store and retrieve data persistently.
Reading from a file
Retrieving stored data from a file for use by a program.
Writing to a file
Saving data from a program into a file.
Random number generation
Producing a value selected unpredictably from a specified range.
Reason to use random numbers
For tasks such as games, simulations or selecting unpredictable values.
SQL
A language used to query and manipulate data held in relational databases.
SELECT (SQL)
Specifies which field or fields should be returned by a query.
FROM (SQL)
Specifies the table from which data should be retrieved.
WHERE (SQL)
Specifies a condition used to filter which records are returned.
OCR J277 required SQL
Using SQL to search for data, including SELECT, FROM and WHERE.
Subprogram
A named block of code that performs a particular task and can be called when needed.
Procedure
A subprogram that performs a task; in OCR Exam Reference Language a procedure does not return a value.
Function
A subprogram that returns a value.
Parameter
A value or variable listed in a subprogram definition so data can be passed into it.
Argument
The actual value supplied when a subprogram is called.
Return value
A value sent back by a function to the part of the program that called it.
Reason to use subprograms
They reduce repetition, improve structure and make programs easier to develop, test and maintain.
Local variable
A variable available only within the subprogram or scope where it is declared.
Global variable
A variable that can be accessed from a wider part of the program.
Meaningful identifiers
They make code easier to understand, debug and maintain.
Indentation
It makes program structure easier to read and, in some languages such as Python, also defines blocks of code.
Nested construct
A programming construct placed inside another, such as a selection inside a loop.
Reading code
Follow the instructions and determine what the program does or what output it produces.
Writing code in Paper 2
Construct a working algorithm/program solution using OCR Exam Reference Language or an appropriate high-level language where permitted.
Limitation of memorising programming definitions
OCR also assesses the ability to interpret, trace, correct, complete and write program code.
Preparation before writing a program solution
Identify the inputs, required outputs and processing, then choose suitable variables, constructs and data structures.