2.2 Programming Fundamentals Flashcards

OCR GCSE Computer Science J277

1
Q

Initialisation

A

Setting the initial value for a variable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Variable

A

An identifier associated with an area of computer memory in which data is stored. The data can change during program execution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Sequence

A

The order. A set of instructions that will be carried out, one after the other, in the stated order.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Constant

A

An identifier associated with an area of computer memory in which data is stored. The data CANNOT change during program execution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Selection

A

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).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Condition

A

An expression that evaluates to True or False (such as within an ‘if’ statement)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Selection with multiple conditions

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Expression

A

Combination of variables, constants, values, or operators that is evaluated to produce a result.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Loop

A

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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Integer

A

A whole number, such as 5. It can be positive or negative.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Integer Division / Floor Division / Quotient

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Modulo operation

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Real / Float

A

Real is also referred to as float. Real numbers include numbers with decimal places. A real number can be positive or negative.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Boolean

A

The Boolean data type is based on logic and can have one of only two values, True or False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Char

A

Char refers to a single character. The character can be any letter, digit or symbol

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

String

A

The string data type refers to text. A string is a collection of characters and includes spaces, punctuation, numeric digits and any other symbols. The numeric digits would be handled as text characters, not integers.

17
Q

Null

A

A null value is used to indicate ‘nothing’; the lack of any value, of any type of data.

18
Q

Data Type

A

An attribute of a data item that determines the values that can be stored and the operations that can be carried out on that data item. Examples include string, character, integer, float (real) and Boolean.

19
Q

Casting

A

Changing the data type of a piece of data. For example, converting a string to an integer using int()

20
Q

Concatenation

A

Joining two or more strings together to make a new string.

21
Q

Index

A

A number that describes the position of an item within an array. Starts at zero for the first item.

22
Q

Substring

A

A part of a string.

23
Q

Function

A

A named block of code that performs a task and returns one or more values.

24
Q

Procedure

A

A named section of code that can be called (executed) to perform a specific task by using the identifier (name of the procedure) in a program statement. It does not return a value.

25
Q

Argument

A

A data value or reference passed to a subroutine as required by its defined parameters.

26
Q

Local Variable

A

A variable that is only defined and visible for use in specific parts of a program, e.g. within a subprogram (procedure or function)

27
Q

Global Variable

A

A variable that is accessible from all parts of a program.

28
Q

Parameters

A

Part of the definition of a subprogram that specifies the data value(s) or reference(s) to be passed to the subprogram when it is called. When calling a subroutine (such as procedure or function), the values of the parameters are passed into the subroutine as arguments.

29
Q

Array

A

A data structure whose elements can be accessed directly by an index. The position of each element is computed at runtime.

30
Q

Data Persistence

A

The characteristic of a state that outlives the program that created it. If a python file creates a text or CSV file, the data in that file has data persistence. It isn’t wiped when the python code stops running.

31
Q

Database

A

An organised collection of data that can be as simple as a single file, and as complex as a set of related tables

32
Q

Primary Key

A

A field (column) that uniquely identifies a record (row) in a database table.

33
Q

Foreign Key

A

FYI - an attribute (field, column) in one table that is the primary key in another table, and used to link the tables together.

34
Q

Record

A

A data structure that can be used to store multiple pieces of data that relate to the same thing. Each piece of data can have a different data type. For instance, name, surname, telephone number for the same person.

35
Q

Field

A

A column in a database, a category heading. Like telephone, surname.

36
Q

Flat file database

A

A database in which all data is held in a single table.