Created
March 1, 2017 00:59
-
-
Save y1n0/ab53842f5a4ecf916ace53491089649c to your computer and use it in GitHub Desktop.
practicepython.org; ex 24
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/python3.5 | |
| def grid(x=1, y=1): | |
| hor_line = ' ---' | |
| ver_line = '| ' | |
| print(hor_line*x) | |
| for i in range(y): | |
| print(ver_line*x+'|') | |
| print(hor_line*x) | |
| def extract_size(s): | |
| x = int(s.split('x')[0]) | |
| y = int(s.split('x')[1]) | |
| return x,y | |
| print('·-----------------------------·') | |
| print('| WELCOME TO TIC TAC TOW GAME |') | |
| print('·-----------------------------·') | |
| print('\nCurrently the game is not ready to play, but you still however can choose your board\'s size.') | |
| size = input('enter the board size (in \'a x b\' format)') | |
| grid(*extract_size(size)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment