What is a variable declaration?
A statement that creates a variable to store data. Example: score = 0.
What is a constant declaration?
A named value that does not change while the program runs. Example: PI = 3.14.
What is assignment in programming?
Giving a value to a variable, or updating it. Example: total = total + 1.
What are the three programming constructs?
Sequence, selection, and iteration.
What is meant by ‘selection’?
Decision making, such as IF ELSE statements.
What is meant by ‘iteration’?
Repetition or loops, such as FOR and WHILE loops.
What are arithmetic operations?
Mathematical calculations, such as addition, subtraction, multiplication, and division.
What does modulus return?
Modulus returns the remainder of a division. Example: 9 MOD 5 = 4.
What does quotient return?
Quotient returns the largest integer from a division. Example: 11 DIV 5 = 2.
What are comparison operators?
Comparison operators compare items of data, and either return True or False.
What does the symbol != represent?
Not equal to.
What are the three Boolean operators?
NOT, AND, OR.
What are data types?
A data type defines the kind of data a variable or constant holds.
What are the 5 main data types?
Integer (int), Real (float), Boolean (bool), Character (char), and String (str).
Why are data types important?
They help the computer understand how to store and manipulate data, and allow you to perform the correct operations on data.
What does length() do?
Returns the number of characters in a string.
What does subString(x, y) do?
Extracts a sequence of characters from a string: returns y characters, starting from the xth position in the string.
What is string concatenation?
The joining together of two strings using the + operator, e.g. “Hi” + “ there” = “Hi there”.
What two things can you do to a file?
Read to and write from it.
What must you always do once you are done reading / writing a file?
Close the file.
What is a record?
A record is a data structure which groups different types of data together, and is similar to a row in a database.
What is an array?
An array is a fixed-size data structure that only contains items of the same data type.
What is a 2D array?
An array of arrays, similar to a database table or a grid.
What are the three main SQL commands?
SELECT, FROM, WHERE.