def empty_square(n):for i in range(n):if i == 0 or i == n-1:print('' n)else:print('' + ' ' (n-2) + '*')
empty_square(5)
def full_square(n):for i in range(n):print('' n)
full_square(5)
def triangle(n):for i in range(n):print(' ' (n-i-1) + '' (2i+1))
triangle(5)
def empty_square(n):
for i in range(n):
if i == 0 or i == n-1:
print('' n)
else:
print('' + ' ' (n-2) + '*')
empty_square(5)
Квадрат полныйdef full_square(n):
for i in range(n):
print('' n)
full_square(5)
Треугольникdef triangle(n):
for i in range(n):
print(' ' (n-i-1) + '' (2i+1))
triangle(5)