Program to print the pyramid structure

In this program, we will print the pyramid structure.

Steps to solve the program
				
					var1 = 3
var2 = 5

for i1 in range(5):
    for j1 in range(9):

        if j1 > var1 and j1 < var2:

            print("*", end=" ")
        else:
            print(" ", end=" ")
    print("\n")

    var1 = var1 - 1
    var2 = var2 + 1
				
			

Output :

				
					        *        

      * * *       

    * * * * *     

  * * * * * * *   

* * * * * * * * * 
				
			

print the pattern A

count total numbers of even numbers between 1-100

Leave a Comment