REPETITION (continued)
Another way to achieve the same outcome is to use a FOR loop. This is another type of repetition construct. View the following pseudocode.

FOR X = 1 TO 4
   PRINT X

This pseudocode would start with X=1. It would keep repeating until X equals 4. Implicit in the pseudocode is the consideration that each time the PRINT statement is repeated, we would increment (add 1 to) X.
So, the output would be:

1
2
3
4

Depending on the programming language you choose, a FOR loop in actual code can look a bit complicated if you are just starting out.

In Python code the example would look like:

Example4.py

for x in range(1,5):
   print(x)

This seems fairly straight forward, however if you were to choose another programming language like C++ or PHP, it would look significantly differennt.