Key Programming Concepts

Periodic Table

Va
Variable
In a program, a variable holds a value in memory. This value can change.
Co
Constant
In a program, a constant holds a value in memory. This value cannot change.
Se
Sequence
A set of instructions that are executed in order, one at a time..
It
Iteration
Using a loop in a program to repeat the execution of a block of code several times.
Br
Branching / Selection
Branching a.k.a selection is when when an if statement is used to decide if a block of code needs to be executed.
In
Integer
A data type for whole numbers e.g. 7 or -200
Fl
Float
A data type for decimal numbers e.g. 3.14
St
String
A data type for text: a string is a collection of characters.
Bo
Boolean
A data type for True or False values.
Fo
For Loop
A count-controlled loop that repeats a section of code a fixed number of times.
Wh
While Loop
A condition-controlled loop that repeats a section of code while a condition is true.
Re
Repeat Until
A condition-controlled loop that repeats a section of code up until a condition is met.
If
If Statement
When a condition is checked to decide if a block of code will be executed.
Se
Select Case
An alternative to IF, ELSE IF code used to check multiple possible values of a variable.
In
Input
Retrieving a user input e.g.
username = INPUT("Enter your username")
Ou
Output
When a program produces an output such as displaying a message on screen. e.g.
PRINT("Game Over")
Ca
Casting
Converting a value from one data type to another using functions such as str(), int() or float().
Sm
String Manipulation
A range of techniques used to manipulate text/strings using functions such as UPPER(), LOWER() to change the case of a string, LENGTH() to find out the number of characters of a string, LEFT(), RIGHT() and SUBSTRING() to extract characters from a string.

String concatenation: joining two strings together. e.g.
PRINT("Hello " + playerName)
As
Assignment Operator
= is the assignment operator used to change the content of a variable. e.g.
score = 10
Ar
Arithmetic Operators
+, -, *, /, ^ (to the power of), DIV (quotient, whole division), MOD (remainder) are the main arithmetic operators.
Co
Comparison Operators
==, !=, <, <=, >, >= are the main comparison operators.
Bo
Boolean Operators
AND, OR, NOT are the main Boolean operators.
Ne
Nesting
When a loop or an if statement is used within another loop or if statement.
Li
List
When multiple values are stored under one identifier. e.g.
scores = [5,9,8,8,10,3]
Ar
Array
When multiple values are stored under one identifier. An array has a fixed size. e.g.
days = ["Mo","Tu","We","Th","Fr","Sa","Su"]
Re
Record
A record is a collection of fields used to store multiple values under one identifier. e.g.
player.firstname="James"
player.lastname="Bond"
player.score=7
Fu
Function
A subroutine/subprogram that returns a value. A function has a unique name (identifier) and can take parameters. e.g.
calculateSquareArea(width)
Pr
Procedure
A subroutine/subprogram that does not return a value. A procedure has a unique name (identifier) and can take parameters. e.g.
displayMessage(text)
Va
Validation
Validation checks/routines are used in programs to make systems more robust. User inputs are checked to ensure that these inputs are valid: e.g. a password should be at least 8 characters long, a username should not be empty, an e-mail address should contain an @ sign, a score should be a positive integer, etc.
Te
Testing
The purpose of testing is to
  • Check that the system/code is meeting the user requirements and producing the required outputs.
  • Try to find bugs in the code.
Sy
Syntax Error
When the syntax of the code is invalid due to a spelling mistake, a missing bracket or speechmark, etc.
A code with a syntax error will not compile.
Lo
Logic Error
When the code does compile (correct syntax) but does not produce the expected output.