title: Python: How to print a message within a "frame", using if,for and while control statements? Really confused
body: <p>The user inputs a message, the number of times he wants the message to be repeated,
   and the "thickness" of the frame. It prints out the message within a frame consisting of '*','|',and'-' symbols. My program:</p>
  
  <pre><code>x = input("Enter the message:\n")
  y = eval(input("Enter the message repeat count:\n"))`enter code here`
  z = eval(input("Enter the frame thickness:\n"))
  
  
  for top in range (z):
      print("|"*(z-1)+"+"+"-"*(len(x)+2)+"+"+"|"*(z-1))
  for repeat in range(y):
      print("|"*z,x,"|"*z)
  for bottom in range(z):
      print("|"*(z-1)+"+"+"-"*(len(x)+2)+"+"+"|"*(z-1))
  </code></pre>
  
  <p>example output with repeat count 3, frame thickness 2 and message:"Hello World"</p>
  
  <pre><code>|+-------------+|
  |+-------------+|
  || Hello World ||
  || Hello World ||
  || Hello World ||
  |+-------------+|
  |+-------------+|
  </code></pre>
  
  <p>But that is not the required frame. This is how it has to look:</p>
  
  <pre><code>+---------------+
  |+-------------+|
  || Hello World ||
  || Hello World ||
  || Hello World ||
  |+-------------+|
  +---------------+
  </code></pre>
  
  <p>Am i correct in using 3 different loops? I am struggling to 'double' loop the top and bottom parts of frame so that in each frame level, there is one "+" in each corner, a "-" along the top and bottom parts of the frame and a "|" along the left and right side. I thought it would be a similar concept to printing out a pyramid at the bottom and an inverted pyramid on top, but that got me  no where. The program i did above was the one that LOOKED the closest to the desired result. As you can see, each 'frame' on the top and bottom is different. ;(</p>
  
  <p>These are the actual instructions:</p>
  
  <p>Write a program to draw a frame (made of the characters +-|) around a message that has been repeated on consecutive lines.  There is a space before and after the message, and no spaces between concentric boxes.</p>
  
  <p>Please help. Python V3.x</p>