rows = int(input("Enter the no. of rows in A"))

for i in range(rows):
    space = rows - i - 1
    while space>0:
        space = space -1
        print(" ",end='')
    for j in range(i):
        if j == 0 or j == i-1:
            print("*",end=' ')
        elif i==rows/2:
            print("*",end=' ')
        else:
            print(" ",end=' ')
    print()
    
    

d7d6e0bc6f9019a3c1c14525a9691e0122f7e809
<mask token>

<mask token>
for i in range(rows):
    space = rows - i - 1
    while space > 0:
        space = space - 1
        print(' ', end='')
    for j in range(i):
        if j == 0 or j == i - 1:
            print('*', end=' ')
        elif i == rows / 2:
            print('*', end=' ')
        else:
            print(' ', end=' ')
    print()

rows = int(input('Enter the no. of rows in A'))
for i in range(rows):
    space = rows - i - 1
    while space > 0:
        space = space - 1
        print(' ', end='')
    for j in range(i):
        if j == 0 or j == i - 1:
            print('*', end=' ')
        elif i == rows / 2:
            print('*', end=' ')
        else:
            print(' ', end=' ')
    print()

rows = int(input("Enter the no. of rows in A"))

for i in range(rows):
    space = rows - i - 1
    while space>0:
        space = space -1
        print(" ",end='')
    for j in range(i):
        if j == 0 or j == i-1:
            print("*",end=' ')
        elif i==rows/2:
            print("*",end=' ')
        else:
            print(" ",end=' ')
    print()
    
    
