Skip to main content

Different Shapes of Pyramid In Python Programming Language

    

Hello FriendsЁЯТЦ


In Our Previous Blog, We have Learned the Basics of Python Programming Language & Simple Program in Python Programming Language.

In Today's Blog We Will Create Different Shapes of Pyramid in Python Programming Language.


Different Shapes of Pyramid in Python Programming Language.


Program

no=int(input("Pyramid Limit ="))

for i in range(1,no+1):

    for j in range(1,i+1):

        print("*",end=" ")

    print()


Output

Pyramid Limit =7

* * 

* * * 

* * * * 

* * * * * 

* * * * * * 

* * * * * * *  


Different Shapes of Pyramid in Python Programming Language..


Program

no=int(input("Pyramid Limit ="))

for i in range(1,no+1):

    for j in range(i,no+1):

        print("*",end=" ")

    print()


Output

Pyramid Limit =7

* * * * * * * 

* * * * * * 

* * * * * 

* * * * 

* * * 

* * 


Different Shapes of Pyramid in Python Programming Language.


Program

no=int(input("Enter Number of rows ="))

for i in range(no,1,-1):

    for space in range(0,no-i):

        print("  ",end="")

    for j in range(i,2*i-1):

        print("* ",end="")

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

        print("* ",end="")

    print()


Output

Enter Number of rows =7

* * * * * * * * * * * 

  * * * * * * * * * 

    * * * * * * * 

      * * * * * 

        * * * 

          * 


Different Shapes of Pyramid in Python Programming Language.


Program

no=int(input("Pyramid Limit ="))

for i in range(1,no+1):

    for j in range(i,no+1):

        print("*",end=" ")

    print()

for i in range(1,no+1):

    for j in range(1,i+1):

        print("*",end=" ")

    print()


Output

Pyramid Limit =10

* * * * * * * * * * 

* * * * * * * * * 

* * * * * * * * 

* * * * * * * 

* * * * * * 

* * * * * 

* * * * 

* * * 

* * 

* * 

* * * 

* * * * 

* * * * * 

* * * * * * 

* * * * * * * 

* * * * * * * * 

* * * * * * * * * 

* * * * * * * * * *   


If You want to Know the Basics of Python Programming Language then Click On this Link.


If You want to Know about Information Technology or It Technology, Then Click on the Link given above.

If you want to see Our Privacy Policy then You Can Click on this Link.


Hope, You Enjoy this Our Blogs on Python Language.ЁЯШК



Comments

Post a Comment

Popular posts from this blog

Read about Python Programming Language.

       Hello Friends. In Our Previous Blog ,   We have Learned the Basics of Python Programming Language & Simple Program in  Python Programming Language. In Today's Blog We Will Create Some Basic Program in Python Programming Language. Print List Item in Assending Order Without Using Sort Function Program in Python Programming Language. Assending Order- Program #List in Assending Order list=[9,5,1,7,5,3,6,2,8,0] for i in range(0,len(list)):     for j in range(i+1,len(list)):         if list[i]>list[j]:             temp=list[i]             list[i]=list[j]             list[j]=temp print(type(list)) print("Assending Order = ",list)      Outpu t <class 'list'> Assending Order =  [0, 1, 2, 3, 5, 5, 6, 7, 8, 9] Print List Item in Dessending Order Without Using Sort Function Program in Python Programming Language...

Learn Python Programming

  Hello Friends.ЁЯТЦ In Our Previous Blog,   We have Learned the Basics of Python Programming Language & 2 Digit Swapping Program. "Now In this Blog, We will learn to make Palindrom Number Programs in Python Programming Language." Python Program To Check Number is Palindrom Or Not a Palindrom. Program no=int(input("Enter Any Number = \t")) temp=no sum=0 while no>0:     r=no%10     sum=sum*10+r     no=int(no/10) if temp==sum:     print("Palindrom Number = \t",sum) else:     print("Not a Palindrom Number = \t",sum) Output Enter Any Number =     1219 Not a Palindrom Number =     9121 Enter Any Number =    171 Palindrom Number =    171 If You want to Know the Basics of Python Programming Language then Click On this Link. Learn Basics of Python Learn Hello-World Program in Python Learn Swapping Program in Python Learn Prime Number Program in Python If You want to Know about Information Te...

Read Some Basic Program in Python

      Hello FriendsЁЯТЦ In Our Previous Blog ,   We have Learned the Basics of Python Programming Language & Simple Program in  Python Programming Language. In Today's Blog We Will Create Some Basic Program in Python Programming Language. Some Basic Program in Python Programming Language. Factorial- Program #Factorial Program in Python. no=int(input("Enter any Number = ")) fact=1 print("Factoral - Series ") for i in range(1,no+1):     fact=fact*i     print(fact) Outpu t Enter any Number = 10 Factoral - Series  1 2 6 24 120 720 5040 40320 362880 3628800 Some Basic Program in Python Programming Language. Fibonacci Program #Fibonacci Program In Python a=int(input("Enter Second Value = ")) b=int(input("Enter First Value = ")) print("Fibonacci-Series") for i in range(0,10):     total=a+b     a=b     b=total     print(total) Outpu t Enter Second Value = 1 Enter First Value = 2 Fibonacci-Series 3 5 8 13...