Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 12e914a

Browse files
committed
Python Program to print pattern of letter L
1 parent 9666abf commit 12e914a

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

‎patterns/Pattern-L.py‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
__author__ = 'Avinash'
2+
3+
4+
# Python3 program to print alphabet pattern L
5+
6+
# *
7+
# *
8+
# *
9+
# *
10+
# *
11+
# *
12+
# *
13+
# * * * * * * * *
14+
15+
def print_pattern(n):
16+
for row in range(n):
17+
for column in range(n):
18+
# first column
19+
if (column == 0 or
20+
# last row
21+
row == n - 1):
22+
print("* ", end="")
23+
else:
24+
print(" ", end="")
25+
print()
26+
27+
28+
size = int(input("Enter the size: \t"))
29+
30+
if size < 8:
31+
print("Enter a value minumin of 8")
32+
else:
33+
print_pattern(size)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /