In the previous section, we learned how to write a very simple script and we saw that a script is just a sequence of commands. In this section, you will learn how to use statements in order to control the behaviour of a script. This enables you to code scripts that can perform different and much more complicated tasks.
We will discuss the different type of statements:
while, and so on by evaluating whether a number is a prime number or not. As you know, a prime number (or just a prime) x is a natural positive number that has exactly two divisors—1 and itself. Adivisor y is a natural positive number larger than 1 such that the division x/y has no remainder. From the definition of a prime, we may write a simple program ...