Created
December 6, 2016 05:41
-
-
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
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
#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