Skip to content

Instantly share code, notes, and snippets.

@shamikalashawn
Created February 6, 2017 23:04
Show Gist options
  • Save shamikalashawn/12fd4433b1e0c1ea90dbd4d7b9f6915e to your computer and use it in GitHub Desktop.
Save shamikalashawn/12fd4433b1e0c1ea90dbd4d7b9f6915e to your computer and use it in GitHub Desktop.
A "*" box is created using nested while loops.
def nested_while_loop_box():
row = 0
col = 0
box = ''
while row < 4:
while col < 4:
box = box + '****'
row += 1
box = box + '\n'
col += 1
return box
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment