title: print out tiles from command line argument
body: <p>I need to print out tiles based on command line arguments in which first argument is the width and second is the name. 
  for example:</p>
  
  <pre><code>$ python tile.py 5 tommy
  ------+|+------
  ---+|++|++|+---
  -----TOMMY-----
  ---+|++|++|+---
  ------+|+------
  </code></pre>
  
  <p>or</p>
  
  <pre><code>$ python tile.py 7 Samuel 
  ---------+|+---------
  ------+|++|++|+------
  ---+|++|++|++|++|+---
  --------SAMUEL-------
  ---+|++|++|++|++|+---
  ------+|++|++|+------
  ---------+|+---------
  </code></pre>
  
  <p>as there are some restriction: width can only be odd, and the length of the name cannot exceed 3*width. </p>
  
  <p>I am confused how to do the vertical part as it can be 5, 7, or more layers</p>
  
  <pre><code>import sys
  a = int(sys.argv[1])
  if a%2==0:
      print('Error: tile height must be an odd number')
  else:
      if len(sys.argv[2])&gt;(3*a):
          print('Error: name must fit within {} characters'.format(3*a))
      else:
          print('-'*((3*a-3)/2)+'+-+'+'-'*((3*a-3)/2))
          print('-'*((3*a-9)/2))
  </code></pre>