Example: $ python tile.py 4 tommy Error: tile height must be an odd number Example: $ python tile.py 3 thisnameistoolong Error: name must fit within 9 characters Example: $ python tile.py 5 againthisnameistoolong Error: name must fit within 15 characters Example: $ python tile.py 5 tommy +| +- -|++ | ++ | + -TOMMY--- --- +++|++|+--- Example: $ python tile.py 7 daria +|++|++| + ---+|++|++ |++|++|+ -DARIA- ---+|++|++ |++|++|+-- + |++|++|+
Example: $ python tile.py 4 tommy Error: tile height must be an odd number Example: $ python tile.py 3 thisnameistoolong Error: name must fit within 9 characters Example: $ python tile.py 5 againthisnameistoolong Error: name must fit within 15 characters Example: $ python tile.py 5 tommy +| +- -|++ | ++ | + -TOMMY--- --- +++|++|+--- Example: $ python tile.py 7 daria +|++|++| + ---+|++|++ |++|++|+ -DARIA- ---+|++|++ |++|++|+-- + |++|++|+
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Can you help me to write this program in python, please

Transcribed Image Text:Example:
$ python tile.py 4 tommy
Error: tile height must be an odd number
Example:
python tile.py 3 thisnameistoolong
Error: name must fit within 9 characters
Example:
$ python tile.py 5 againthisnameistoolong
Error: name must fit within 15 characters
Example:
$ python tile.py 5 tommy
---
+|++| ++| +
-TOMMY--
+ ++
++
Example:
$ python tile.py 7 daria
++
+++.
+| ++ | ++ | ++ | ++ | +
-DARIA-
++|++|++|++ | +
++
++

Transcribed Image Text:A linoleum tile company has recently set up a new online store and to showcase its move into the
digital space, it wishes to allow its members to create custom digital tiles. An example of a digital tile
is as follows.
++
-TOMMY
++
++|
The tile company has asked you to write a program which will output a digital tile based on some
command line arguments.
• The first command line argument is the height of the tile
• The second command line argument is a member's name which should be included in capitals
in the center of the tile
There are some constraints to keep in mind about the size of the tile.
• The height of the tile must be an odd integer.
• The width of the tile is exactly 3 times the height of the tile
• The member's name must fit within the width of the tile, otherwise the tile cannot be
generated
You can assume all command line arguments will be provided and the first argument can be cast to
an integer.
In Python, you can construct repeated strings with string multiplication. You may use this in your
solution.
'a'
* 4 ==
'aaaa'
'b' * 6
'bbbbbb'
==
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 5 images

Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question
I tried, but it is not run
![[user@sahara ~]$ python3 tile.py
Traceback (most recent call last):
File "/home/tile.py", line 4, in <module>
height
IndexError: list index out of range
int(args[1])
[user@sahara ~]$ |](https://content.bartleby.com/qna-images/question/ec2ae404-0619-4da1-b41d-2b12da835c13/1fa9d9d0-9648-4878-9f8c-5f1f77ff10c1/dr42zw9_thumbnail.png)
Transcribed Image Text:[user@sahara ~]$ python3 tile.py
Traceback (most recent call last):
File "/home/tile.py", line 4, in <module>
height
IndexError: list index out of range
int(args[1])
[user@sahara ~]$ |
Solution
Recommended textbooks for you

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education

Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY