Sichanov

square of stars

May 29th, 2021
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. n = int(input())
  2. for i in range(n):
  3.     for j in range(n):
  4.         if (i == 0 or i == n - 1 or j == 0 or j == n - 1):
  5.             print('*', end=' ')
  6.         else:
  7.             print('*', end=' ')
  8.     print()
  9.  
Advertisement
Add Comment
Please, Sign In to add comment