Hello FriendsЁЯТЦ
In Our Previous Blog, We have Learned the Basics of Python Programming Language & Simple Program in Python Programming Language.
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
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
Program
Great
ReplyDeleteCool broЁЯТЫ
ReplyDelete