Skip to content

Instantly share code, notes, and snippets.

@ProjectJYL
Created December 6, 2016 05:41
Show Gist options
  • Save ProjectJYL/524a3dce5cefc21fbcfc0d5312982dfd to your computer and use it in GitHub Desktop.
Save ProjectJYL/524a3dce5cefc21fbcfc0d5312982dfd to your computer and use it in GitHub Desktop.
Make a fake graphic by printing out a game board. http://www.practicepython.org/exercise/2014/12/27/24-draw-a-game-board.html
#Draw A Game Board
def make_board(num = 3):
for i in range(num):
print " ---" * num
print "| " * (num + 1)
print " ---" * num
if __name__ == "__main__":
num = int(raw_input())
make_board(num)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment