Skip to content

Instantly share code, notes, and snippets.

@odanga94
Created May 22, 2017 16:17
Show Gist options
  • Save odanga94/454d1041bc56a40f29b5db368c4e3472 to your computer and use it in GitHub Desktop.
Save odanga94/454d1041bc56a40f29b5db368c4e3472 to your computer and use it in GitHub Desktop.
PracticePython/Exercise24
def draw_board():
n = int(raw_input("Enter the board size you want: "))
if n == 1:
print(" ---")
print("| |")
print(" ---")
else:
for i in range(n):
print(""),
for i in range(n - 1):
print("---" ),
print("--- ")
for i in range(n):
print("| "),
print("|")
print(""),
for i in range(n - 1):
print("---" ),
print("--- ")
draw_board()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment