Skip to content

Instantly share code, notes, and snippets.

@rostyq
Created August 1, 2017 16:39
Show Gist options
  • Save rostyq/c3fcf4a0dbfca4b2b2f714840ef76e6a to your computer and use it in GitHub Desktop.
Save rostyq/c3fcf4a0dbfca4b2b2f714840ef76e6a to your computer and use it in GitHub Desktop.
def print_board(x, y):
for i in range(y):
print('+' + '---+'*x + '\n|' + ' |'*x)
print('+' + '---+'*x)
user = input("Size of board (XxY) -> ")
user = user.split('x')
x = int(user[0])
y = int(user[1])
print_board(x, y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment