Query regarding star pattern printing


n=int(input(" n:"))
for i in range(n-1):
for j in range(i+1):
print("",end=" “)
for j in range(i,n-1):
print(” “,end=” “)
for j in range(i,n-2):
print(” “,end=” “)
for j in range(i+1):
print(”
",end=" “)
print()
for i in range(n):
for j in range(i,n):
print(”",end=" “)
for j in range(i):
print(” “,end=” “)
for j in range(i-1):
print(” “,end=” “)
for j in range(i,n):
print(”
",end=" ")

print()

n:5

  •           * 
    







  •           * 
    

pl correct for extra star