-
-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathPattern-L.py
More file actions
33 lines (26 loc) · 553 Bytes
/
Pattern-L.py
File metadata and controls
33 lines (26 loc) · 553 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
__author__ = 'Avinash'
# Python3 program to print alphabet pattern L
# *
# *
# *
# *
# *
# *
# *
# * * * * * * * *
def print_pattern(n):
for row in range(n):
for column in range(n):
# first column
if (column == 0 or
# last row
row == n - 1):
print("* ", end="")
else:
print(" ", end="")
print()
size = int(input("Enter the size: \t"))
if size < 8:
print("Enter a value minumin of 8")
else:
print_pattern(size)