Created
February 6, 2017 22:43
-
-
Save shamikalashawn/3539b51dc33d16f67554f1dcb149eb02 to your computer and use it in GitHub Desktop.
A character is turned into a box with the inside missing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def create_open_box(height, width, character): | |
box = '' | |
if height in range(1,3) or width in range(1,3): | |
for row in range(height): | |
box = box + (character * width) + '\n' | |
print('regular open box') | |
else: | |
for row in range(height): | |
if row == 0 or row == height-1: | |
box = box + (character * width) + '\n' | |
else: | |
box = box + character + (" " * (width - 2)) + character + '\n' | |
print (box) | |
return box |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment