n=int(input("Enter Number :"))
#Pattern 6 print('(06)') b = n//2 if b%2 == 0 : a = b for i in range(0, a) : for j in range(0, a - i - 1) : print(end=" ") for j in range(0, i + 1) : print('*', end=" ") print() for i in range(a, 0, -1) : for j in range(a - i + 1, 0, -1) : print(end=" ") for j in range(i, 0, -1) : print('*', end=" ") print() print() else : a = b+1 for i in range (0,a) : for j in range (0,a-i-1) : print(end=" ") for j in range (0,i+1) : print('*', end=" ") print() for i in range (a,0,-1) : for j in range (a-i,0,-1) : print(end=" ") for j in range (i,0,-1) : print('*', end=" ") print() print()
Comments