The template:
#repeat 3 My bonnie lies over the ocean #end repeat O, bring back my bonnie to me!
The output:
My bonnie lies over the ocean My bonnie lies over the ocean My bonnie lies over the ocean O, bring back my bonnie to me!
The generated code:
for i in range( 3): write('My bonnie lies over the ocean\n') write('O, bring back my bonnie to me!\n')