
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
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 stepSolved 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
by Bartleby Expert
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
by Bartleby Expert
Knowledge Booster
Similar questions
- This is from the book starting out with python >>> fourth edition by Tony Gladdis. I sent this one but it was the wrong solution, this problem I am having is a programming one, not Java. I just want to be more concise with my wording, and thank you for helping me.arrow_forwardNote: Please do this using Python 3. Here is the text version: Q1,Q2,Q3,Q4,Q5,Q6,Q7,Q8,Q9,Q10A,B,A,C,C,D,E,E,A,DD,B,A,B,C,A,E,E,A,DE,D,D,A,C,B,E,E,A,DC,B,A,E,D,C,E,E,A,DA,B,D,C,C,D,E,E,A,DB,B,E,C,C,D,E,E,A,DB,B,A,C,C,D,E,E,A,DE,B,E,C,C,D,E,E,A,Darrow_forwardI am stuck trying to create a program in PYTHON that calculates the coins needed to make change for a specified US monetary amount.arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY

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