0% found this document useful (0 votes)
5 views2 pages

Pyramid Programs

Uploaded by

palir67298
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

Pyramid Programs

Uploaded by

palir67298
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

rows = int(input("Enter number of rows: "))

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


for j in range(1, i+1,1):
print(1, end=" ")
print()
1
22
333
4444
55555

rows = int(input("Enter number of rows: "))


for i in range(1, rows+1, 1):
for j in range(1, i+1,1):
print(j, end=" ")
print()
1
12
123
1234
12345

rows = int(input("Enter number of rows: "))


a = 65
for i in range(rows):
for j in range(i+1):
alphabet = chr(a)
print(alphabet, end=" ")
a+= 1
print()
A
AB
ABC
ABCD

rows = int(input("Enter number of rows: "))


for i in range(rows, 0, -1):
for j in range(0, i):
print("* ", end=" ")
print()
*****
****
***
**
*

rows = int(input("Enter number of rows: "))


for i in range(rows+1, 0, -1):
for j in range(1, i):
print(j, end=" ")
12345
1234
123
12
1

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()

*
* *
* * *
* * * *
* * *
* *
*

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy