Last active
February 6, 2017 23:05
-
-
Save shamikalashawn/5561247c59e8d0f711b05fbc623ca7d1 to your computer and use it in GitHub Desktop.
A box of the character "*" is created using nested for loops.
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 nested_box(): | |
box = '' | |
for col in range(4): | |
if col == 0: | |
box = box | |
else: | |
box = box + '\n' | |
for row in range(4): | |
box = box + '*' | |
box = box + '\n' | |
return box |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment