Draw a tower of a castle.
A tower of a castle has a battlement. The battlement has a number of merlons, the solid upright low wall sections. The space between the merlons is called a crenel. A series of merlons and crenels is called a crenellation. Merlons were used in medieval fortifications to protect the defenders from enemy fire and to allow them to launch projectiles from behind the cover.
Write a program to draw a single tower with a variable number of merlons.
Use this boilerplate code as a starting point:
Remember to add a comment before a subprogram, condition or iteration to explain its purpose.
Use these resources as a reference to help you meet the success criteria.
Check that your program outputs the expected result and has met the success criteria.
Check that you have: