Learn Before
Code
Python Program to Create Pyramid Patterns
#Creating a pyramid pattern in Python
#Specify the number of pyramid rows
rows = int (input ("Enter number of rows: "))
k = 0
for i in range (1, rows + 1):
for space in range (1, (rows-i) + 1): print (end=" ") while k! = (2*i - 1): print ("* ", end = "") k + = 1 k = 0 print()
0
1
Updated 2021-08-28
Tags
Python Programming Language
Data Science
Related
Having Fun with Conditional Statements in Python
Python Standard Library
BioPython
BioPython Tutorial
Bioinformatics Textbook
Five Cool Things You Can Do with Python
Thing You Can Do with Python
Python Program to Make a Simple Calculator
Python Program to Display Calendar
Python Program to Create Pyramid Patterns
Python Program to Solve Quadratic Equations