Tag Archives: Python Program Print Hollow Diamond Star Shape

Python Program Print Hollow Diamond Star Pattern

Python Program Print Hollow Diamond Star Pattern- # Number of rows row = 7 # this code will print upper part of hollow diamond pattern for i in range(1, row+1): for j in range(1,row-i+1): print(” “, end=””) for j in range(1, 2*i): if j==1 or j==2*i-1: print(“*”, end=””) else: print(” “, end=””) print() # now… Read More »

Loading