Created
September 11, 2015 15:08
-
-
Save ejmurray/599cc2a5f14a0076d2f1 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env python | |
""" | |
Prints a grid using functions. | |
Could add the spaces between the bars using " " * 4 | |
""" | |
def line_tme(): | |
bar = "+"+"-" * 4 + "+" + "-" * 4 | |
print bar + bar + "+" | |
def line_mid(): | |
row = "| | |\n" | |
row2 = "| | |" | |
print row * 3, row2 | |
def grid(): | |
line_tme() | |
line_mid() | |
line_tme() | |
line_mid() | |
line_tme() | |
# draw the same grid with four rows and and four columns. | |
def big_grid(): | |
line_tme() | |
line_mid() | |
# grid() | |
big_grid() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment