Making a Box

Published by Helen Yu in

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

Examples

make_box(5) ➞ [
  "#####",
  "#   #",
  "#   #",
  "#   #",
  "#####"
]

make_box(3) ➞ [
  "###",
  "# #",
  "###"
]

make_box(2) ➞ [
  "##",
  "##"
]

make_box(1) ➞ [
  "#"
]

Notes

N/A

Watch a quick demo on how Edabit works.