Ad Code

Responsive Advertisement

Python Program to print Pyramid Pattern

Python Program to Print Pyramid Pattern 

In the tutorial we will Know how to print Pyramid in python

Question 1. Write a Program to Print Pyramid Pattern.



*

* *

* * * 

* * * * 

* * * * * 


Answer-:


for r in range (1,6,1):
    for s in range ( 1,r+1,1):
        print( " * " , end = " " )
    print( " \ r " )
    



Output-:


*


*  *


*  *  *


*  *  *  *


*  *  *  *  * 


Process finished with exit code 0



How this Program Works ?

Watch the Video For detailed Explanation.


For any Query comment below