CODE :
# Star (*) Pyramid using Python www.codewithcurious.com
def Pyramid(n): y = n - 1 for i in range(0, n): for j in range(0, y): print(end=" ") y = y - 1 for j in range(0, i+1): print("* ", end="") print("\r")
rows = 6 Pyramid(rows)
OUTPUT :
CODE :
# Star (*) Pyramid using Python www.codewithcurious.com
def Pyramid(n): y = n - 1 for i in range(0, n): for j in range(0, y): print(end=" ") y = y - 1 for j in range(0, i+1): print("* ", end="") print("\r")
rows = 6 Pyramid(rows)
OUTPUT :
CodeWithCurious is a Best Place to Learn & grow your Career in IT sector. Best Content on the latest technology in including C, C++, Java, Python, Sql, Web development & Interview Preparation Material free of cost.
© 2023 All Rights Reserved CodeWithCurious