Level 0 — What does programming even mean
Instructions (statements)
Original notes by SunDiaL · View English source
An instruction is an action that can be carried out by someone or something. In the context of programming, they are executed by the computer. Programming instructions can be thought of as statements, which are broken into:
Imperative statements
This results in the computer doing something on the spot. Performing an operation basically.
Declarative statements
The computer will not do anything... yet. Declarative statements is just you presenting information to the computer.
In order for the computer to be able to "pick up an apple", you (the programmer) first have to teach the computer what an apple is and how to pick up an apple.
Describing the action of picking up an apple is known as function definition. Describing what an apple is is known as class definition.
Flow control statements
As the name suggests, they control the flow of the program. The statements don't make the computer do anything (on the spot), but they do make the computer decide what to do next. They are: