The while loop repeats a group of statements an indefinite number of times under control of a logical condition. A matching end delineates the statements.
Here is a complete program, illustrating while, if, else, and end, that uses interval bisection to find a zero of a polynomial