In the this program, you will print out ASCII-art of one of the most famous vehicles of all time - the Model-T automobile!
Name your program modelt.py
.
Your program should ask the user for one number; the width of the car.
The number that your program accepts should control the width of the center part of the vehicle.
A larger width value should make for a longer car, and vice-versa.
The height of the vehicle should remain the same regardless of the width entered.
Below are several examples of this program running with different input values provided.
Your program should match the look of the outputs exactly.
Model-T length:
0
.-----------.
| ### || ###\
| ### || ####\.
D || <> |------+
| ______ /______ |
\/ /..\ \_____/ /..\ \|
\__/ \__/
Model-T length:
5
.----------------.
| ### || ########\
| ### || #########\.
D || <> |------+
| ______ /______ |
\/ /..\ \__________/ /..\ \|
\__/ \__/
Model-T length:
12
.-----------------------.
| ### || ###############\
| ### || ################\.
D || <> |------+
| ______ /______ |
\/ /..\ \_________________/ /..\ \|
\__/ \__/
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 model T.
Try putting 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
### Class: CSc 110
### Description: Describe your program with one
### or more sentences of text.
###
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.
This PA is due on Saturday, January 25th at 7pm. Turn in the program via Gradescope. Passing all test cases does not guarantee a perfect grade. Your code will also be graded on style and formatting.