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")

Please click on the like button if it worked

Solution not working or have any suggestions? Please send an email to [email protected]

Join Our Facebook Group

Share this example

Download Android App 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