Created
April 17, 2021 12:37
-
-
Save bharathmuddada/17672d13be632ee4e905c3ee54118df3 to your computer and use it in GitHub Desktop.
Pyramid program in python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | |
""" | |
* | |
*** | |
***** | |
******* | |
********* | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment