Solution 1

``````def create_box(height, width, character):
result = ''
for h in range(height):
line = ''
for w in range(width):
line += character
result += (line + '\n')
return result
``````

# Create ASCII Box

Write a program that takes three inputs: height `h` (rows), width `w` (columns), and a character `c` and creates a `h` × `w` box using the character `c`.

For this exercise, it's recommended to use a nested for-loop. There are other ways of solving it (which might be a good starting point), but try reaching the nested for-loop solution.

``````>>> create_box(3, 4, '*')
'****
****
****'
>>> create_box(2, 2, '@')
'@@
@@'
``````

IMPORTANT: You need to `return` your box, not just print it.

### Test Cases

test a 1x1 box -

``````box_1x1_expected = """
@
""".lstrip()

def test_a_1x1_box():
assert create_box(1, 1, '@') == box_1x1_expected
``````

test a 5x8 box -

``````box_5x8_expected = """
xxxxxxxx
xxxxxxxx
xxxxxxxx
xxxxxxxx
xxxxxxxx
""".lstrip()

def test_a_5x8_box():
assert create_box(5, 8, 'x') == box_5x8_expected
``````

test a 3x4 box -

``````box_3x4_expected = """
****
****
****
""".lstrip()

def test_a_3x4_box():
assert create_box(3, 4, '*') == box_3x4_expected
``````
def create_box(h, w, char): pass