9618 · 11.1
Programming Basics flashcards
Revision flashcards for Cambridge 9618 Programming Basics (syllabus 11.1). Flip, recall, then mark a real past-paper question.
Card
What is an identifier?
A name given by a programmer to a variable, constant, procedure, or function. It must be unique and follow specific naming rules (e.g., no spaces, cannot start with a number).
Card
What is a variable?
A named memory location that stores a value which can be changed during the program's execution.
Card
What is a constant?
A named memory location that stores a value which is assigned once and cannot be changed during the program's execution.
Card
What is the purpose of a data type?
It defines the kind of data that can be stored in a variable/constant, the range of possible values, and the set of operations that can be performed on it.
Card
Define the `INTEGER` data type.
Used to store positive or negative whole numbers, including zero. Example: -5, 0, 42.
Card
Define the `REAL` data type.
Used to store numbers that have a fractional part (decimal places). Also known as a floating-point number. Example: 9.81, -0.005.
Card
Define the `CHAR` data type.
Used to store a single character, which can be a letter, a digit, or a symbol. Usually enclosed in single quotes. Example: 'A', '7', '$'.$
Card
Define the `STRING` data type.
Used to store a sequence of zero or more characters. Usually enclosed in double quotes. Example: "Hello World", "1234".
Card
Define the `BOOLEAN` data type.
Used to store one of two logical values: `TRUE` or `FALSE`.
Card
What is declaration in pseudocode?
The process of creating a variable or constant, specifying its identifier and data type. Example: `DECLARE Score : INTEGER`.
Card
What is assignment in Cambridge pseudocode?
The process of giving a value to a variable or constant using the assignment operator `<-`. Example: `Score <- 100`.
Card
Common trap: What is the difference between `=` and `<-` in Cambridge pseudocode?
The arrow `<-` is used for assignment (placing a value into a variable). The equals sign `=` is used for comparison (checking if two values are equal), typically within an `IF` statement or a `WHILE` loop.