Write a program of pyramid pattern in python - Pyramid Pattern program in python - Python Programs - Pattern programs in python

Pyramid Pattern



Output     

     *

   ***

  *****

 *******

*********

Python Code:

# pyramid pattern

n = 5

for i in range(n):

    for j in range(n - i - 1):

        print(' ', end='')

    for k in range(2 * i + 1):

        print('*', end='')

    print('')

Here is the Practical of the above program in Jupyter Notebook




Comments