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! is your home of programming solutions, tutorials, video tutorials and much more. Sign Up for our weekly newsletter to get update about new content.

Like us on Facebook | Connect with us on LinkedIn | Subscribe our Channel on Youtube