Bad_Programist

Untitled

Dec 6th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. def printpretty(x):
  2.     for row in a:
  3.         print(' '. join(row))
  4.  
  5. n = int(input())
  6. a = [['.' for i in range(n)]for j in range(n)]
  7. for i in range(len(a)):
  8.     for j in range(len(a)):
  9.         if i == n // 2 or j == n // 2 or i == j or i == n - j - 1 or j == n - i - 1:
  10.             a[i][j] = '*'
  11. printpretty(a)
Advertisement
Add Comment
Please, Sign In to add comment