Almost all programs consist of the same basic ‘building blocks’, assembled in different ways to achieve a particular goal. Variables, data types, sequence, selection, and iteration are examples of these basic concepts, which all new programmers need to learn. In order to compare and manipulate data, and to make decisions in a program, programmers use a variety of different logical, relational, and arithmetic operators. It is also useful to be able to generate randomness in a program, for example selecting a random number or a random item from a list.
Instructions are all around us. They tell us how to cross the road safely, get from one location to another, and even pay for a ticket on the bus. To tell us exactly how to perform a task instructions need to be expressed precisely and in the correct sequence.
A data type is a formal classification of the type of data being stored or manipulated within a program. Data types are important because they determine the operations that can be performed on the data. For example, you can divide one number by another, but you can’t divide a word by another word.
Variables, data types, sequence, selection, and iteration are examples of these basic concepts, which all new programmers need to learn. In order to compare and manipulate data, and to make decisions in a program, programmers use a variety of different logical, relational, and arithmetic operators.