Created
August 1, 2017 16:39
-
-
Save rostyq/c3fcf4a0dbfca4b2b2f714840ef76e6a to your computer and use it in GitHub Desktop.
Exercise on http://www.practicepython.org
This file contains 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
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