CSc 110 - Short PA - Landmark

Printing the Bodiam Castle

In the this program, you will print out ASCII-art of the Bodiam castle (pictured above). Name your program bodiam.py. Your program should ask the user for one number; the width of the castle. The number that your program accepts should control the width of the parts of the wall on either side of the middle of the front of the castle. The height of the castle (including the towers) can remain the same regardless of the value that the user enters. Below are several examples of this program running with different input values provided. Your program should match the look of the outputs exactly. You can use the differ tool to check that your output matches.

castle width:
1

    .-.-.
[-] |-.-| [-]
| |_| H |_| |
| | | H | | |
| | | H | | |
|_|_||^||_|_|
castle width:
5

        .-.-.
[-]     |-.-|     [-]
| |_____| H |_____| |
| |     | H |     | |
| |     | H |     | |
|_|_____||^||_____|_|
Castle width:
15

                  .-.-.
[-]               |-.-|               [-]
| |_______________| H |_______________| |
| |               | H |               | |
| |               | H |               | |
|_|_______________||^||_______________|_|

Notice that the integer read in is read in on a new line, and that there is an empty space between the line where the integer is read in and the first line of the castle fighter. Try putitng a \n at the end of the input prompt string to accept the integer on the next line.. Any integer number 0 or greater should be supported. You don’t need to worry about handling negative numbers, fractions, or numbers with decimals.

You should also include a comment at the top of the code file. The comment should include your name and a short description of what the program does. Below is a template you may use:

### 
### Author: Your Name Here
### Description: Describe your program with one
###              or more sentences of text.
###

Requirements and Restrictions

You should not use any python libraries or features that will not have been covered by the time this PA is due. You should be using string multiplication to get the sizing of the output correct. You are not allowed to use if-statements or for-loops. We will be checking that your code fulfills the requirements, has good style, etc. Receiving full points on all of the Gradescope test cases does not guarantee you an A.

Due Date

This PA is due on Saturday, Sept 5th at 7pm. Turn in the program via Gradescope. Passing all test cases does not guarantee a perfect grade. Youyr code will also be graded on style and formatting.