Examples of povray loops
Povray have two loops #for (control variable, initial step, final step, change) and #while (condition), all loops needs #end to mark the end of the loop.
Uses for to multiply the initial sphere comes with an animation.
Uses while to create a givien number of sphere in random position an color.