In this assignment, you will write a program that prints out the ASCII-art for an AT-AT walker from Star Wars.
The ASCII art for this walker should be just like the one below (Modified from ASCII art on this site.
________
_,.-Y | | Y-._
.-~" || | | | "-.
|" ""=="|" !""! "|"[]""| _____
L__ [] |..------|: _[----I" .-{"-.
I___| ..| l______|l_ [__L]_[I_/r(=}=-P
[L______L_[________]______j~ '-=c_]/=-^
\_I_j.--.\==I|I==_/.--L_]
[_((==)[`-----"](==)j
I--I"~~"""~~"I--I
|[]| |[]|
|!!| |!!|
|\n| |\n|
([]) ([])
/|..|\ /|..|\
`=}--{=' `=}--{='
.-^--r-^-. .-^--r-^-.
However, your program will not always print out this exact art! The size of the AT-AT will vary depending on the values of three constant variables.
NECK_LENGTH = ?
BODY_HEIGHT = ?
LEG_HEIGHT = ?
You should declare these at the top of your program and give them values.
You should use strings, these constants,string addition, and string multiplication to cause the size to change depending on the values.
Name your program atat.py
.
For example, if each of the constants are set to 0, the program will print out:
________
_,.-Y | | Y-._
.-~" || | | | "-.
|" ""=="|" !""! "|"[]""| _____
L__ [] |..------|: _[----I" .-{"-.
I___| ..| l______|l_ [__L]_[I_/r(=}=-P
[L______L_[________]______j~ '-=c_]/=-^
\_I_j.--.\==I|I==_/.--L_]
[_((==)[`-----"](==)j
I--I"~~"""~~"I--I
|[]| |[]|
|!!| |!!|
|\n| |\n|
([]) ([])
/|..|\ /|..|\
`=}--{=' `=}--{='
.-^--r-^-. .-^--r-^-.
When set to:
NECK_LENGTH = 2
BODY_HEIGHT = 3
LEG_HEIGHT = 4
You should see:
________
_,.-Y | | Y-._
.-~" || | | | "-.
|" ""=="|" !""! "|"[]""|
|" ""=="|" !""! "|"[]""|
|" ""=="|" !""! "|"[]""|
|" ""=="|" !""! "|"[]""| _____
L__ [] |..------|: _[------I" .-{"-.
I___| ..| l______|l_ [__L]___[I_/r(=}=-P
[L______L_[________]______j~ '-=c_]/=-^
\_I_j.--.\==I|I==_/.--L_]
[_((==)[`-----"](==)j
I--I"~~"""~~"I--I
|[]| |[]|
|!!| |!!|
|\n| |\n|
|\n| |\n|
|\n| |\n|
|\n| |\n|
|\n| |\n|
([]) ([])
/|..|\ /|..|\
`=}--{=' `=}--{='
.-^--r-^-. .-^--r-^-.
And when set to:
NECK_LENGTH = 8
BODY_HEIGHT = 5
LEG_HEIGHT = 2
You should see:
________
_,.-Y | | Y-._
.-~" || | | | "-.
|" ""=="|" !""! "|"[]""|
|" ""=="|" !""! "|"[]""|
|" ""=="|" !""! "|"[]""|
|" ""=="|" !""! "|"[]""|
|" ""=="|" !""! "|"[]""|
|" ""=="|" !""! "|"[]""| _____
L__ [] |..------|: _[------------I" .-{"-.
I___| ..| l______|l_ [__L]_________[I_/r(=}=-P
[L______L_[________]______j~ '-=c_]/=-^
\_I_j.--.\==I|I==_/.--L_]
[_((==)[`-----"](==)j
I--I"~~"""~~"I--I
|[]| |[]|
|!!| |!!|
|\n| |\n|
|\n| |\n|
|\n| |\n|
([]) ([])
/|..|\ /|..|\
`=}--{=' `=}--{='
.-^--r-^-. .-^--r-^-.
Notice how the neck, body, and legs change size when the numbers are changed. Your program should not just support these exact numbers. Other values should work as well.
All of your programs should be well-formatted and easy for the graders to read and comprehend. You should follow the style guidelines that we have discussed in class. Each program file should have a header comment at the top that has roughly the following format:
#
# Author: Student Name
# Description:
# A short description of what this program does!
#
This was assigned on January 12th, 2018. It is due on January 19th at 5:00pm.
Turn in each of the files described in the spec (1) to the assignment drop-box in D2L before the due date. Make sure to name the files exactly as this document specifies. In general, make sure to follow these instructions precisely. If you don’t, we will deduct points!!!