solutions

Variable Size Box

Write a function variable_size_box that similarly to the function from the previous assignment nested_box(), returns a string with a box. In this case, also using a nested for loop, the function should accept two optional parameters with the size and the character to use. Example:

variable_size_box()
"""
****
****
****
****
"""

variable_size_box(3, '@')
"""
@@@
@@@
@@@
"""

variable_size_box(5, '.')
"""
.....
.....
.....
.....
.....
"""

Test Cases

tests

[]