Required Output:
Program:
Program:
star = int(input("Enter any number:")) space = star // 2 for i in range(1,star+1,2): for j in range(0,space): print(" ",end="") space = space -1 while(i>0): print("*",end="") i=i-1 print() star = star - 2 space = 1 for i in range(star,0,-2): for j in range(0,space): print(" ",end="") space = space + 1 while(i>0): print("*",end="") i=i-1 print()