KEMBAR78
Pattern Program 32 | PDF
0% found this document useful (0 votes)
10 views1 page

Pattern Program 32

The document contains Python code snippets for generating specific patterns based on user input. It includes three patterns: one that prints numbers in a triangular format, another that prints a mirrored triangular pattern, and the last that prints characters based on their ASCII values. Each pattern is generated using nested loops and formatted with spaces for alignment.

Uploaded by

vishnu200121
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)
10 views1 page

Pattern Program 32

The document contains Python code snippets for generating specific patterns based on user input. It includes three patterns: one that prints numbers in a triangular format, another that prints a mirrored triangular pattern, and the last that prints characters based on their ASCII values. Each pattern is generated using nested loops and formatted with spaces for alignment.

Uploaded by

vishnu200121
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/ 1

8) print(" "*p,end="")

9) for q in range(1,num+1-p):
10) print(q+p,end=" ")
11) print()

1
12
123
1234
12345
2345
345
45
5

Pattern-79:
1) num=int(input("Enter a number:"))
2) for i in range(1,num+1):
3) print(" "*(num-i),end="")
4) for j in range(1,i+1):
5) print(j,end=" ")
6) print()
7) for p in range(1,num):
8) print(" "*p,end="")
9) for q in range(1,num+1-p):
10) print(q,end=" ")
11) print()

1
12
123
1234
12345
1234
123
12
1

Pattern-80:
1) num=int(input("Enter a number:"))
2) for i in range(1,num+1):
3) print(" "*(num-i),end="")
4) for j in range(1,i+1):
5) print(chr(64+i),end=" ")
6) print()

nd
DURGASOFT, # 202, 2 Floor, HUDA Maitrivanam, Ameerpet, Hyderabad - 500038,
32  040 – 64 51 27 86, 80 96 96 96 96, 92 46 21 21 43 | www.durgasoft.com

You might also like