CSc 110: Bat

This assignment should be written in the python programming language. You should only use python features that we have discussed up to this point. If you have questions about whether or not a particular feature can/should be used, ask the instructors! You may use any python version 3.0 or newer.

All of your programming should be well-formatted and easy for the graders to read and comprehend. Some points are allocated towards style and commenting! Each program file should have a header comment at the top that has the following format:

#
# Author: Student Name
# Description:
#    A short description of what this program does!
# 

If any part of your scripts are particularly complex, you should put documentation comments above those lines of code.

Bat (24 points)

You will be writing a program that prints out a bat to the python console. However, the program will not always print out the same exact bat. At the top of the program, you will declare a constant variable named BAT_WIDTH, which can hold the value of any positive integer, or zero. Your program will print out a bat whose wing width corresponds to this constant value.

For example, if BAT_WIDTH = 0, then your program will print out a bat that looks like this:

\****\ /\_/\ /****/
 \    \|* *|/    /
  \    | - |    /
   \__ ||*|| __/
       {   }

This is the smallest possible bat that your program will print out.

When BAT_WIDTH = 1, the bat will look like:

\****\_  /\_/\  _/****/
 \    *\_|* *|_/*    /
  \     *| - |*     /
   \___ *||*||* ___/
         {   }

When BAT_WIDTH = 2, the bat will look like:

\****\__   /\_/\   __/****/
 \    **\__|* *|__/**    /
  \      **| - |**      /
   \____ **||*||** ____/
           {   }

When BAT_WIDTH = 5:

\****\_____      /\_/\      _____/****/
 \    *****\_____|* *|_____/*****    /
  \         *****| - |*****         /
   \_______ *****||*||***** _______/
                 {   }

Notice how the bat increases in width each time the value is changed. The two “dipped” sections of the bat wings increase in width each time the number changes.

To get full points, you should make sure that your bat prints out just like the above examples. You should also test your bat with the constant values: 3, 7, 10, 15, and 25.

You may not use loops to implement this. You should only use strings, string variables, the print() function, and string multiplicaiton/concatenation.

Submission and grading

This problem will be graded out of 24 points. It is due on 6/16/2017 at 6:00pm.

You should put all of your code in to a python file named bat.py. Submit bat.py to the associated D2L dropbox. Following these turn-in and naming instructions closely is very important, because our grading scripts will depend on some of the details. You may lose points if these instructions are not followed precisely!