Making a Box

Challenge Difficulty: Medium | Estimated completion time: ~15 minutes

Create a function that creates a box based on dimension n.

Examples

makeBox(5) ➞ [
  "#####",
  "#   #",
  "#   #",
  "#   #",
  "#####"
] 5x5 box
 
makeBox(3) ➞ [
  "###",
  "# #",
  "###"
] 3x3 box
 
makeBox(2) ➞ [
  "##",
  "##"
] 2x2 box
 
makeBox(1) ➞ [
  "#"
] 1x1 box

Solution

Python
Output