Python Program to Print Half Pyramid



In this program we will print half pyramid using *



  1. #print half pyramid
  2. n=int(input("Enter number of rows: "))
  3. for i in range(0, n):
  4. for j in range(0, i+1):
  5. print("* ",end="")
  6. print("\r")

Output


Output!