Skip to content

Commit 7ef1fbe

Browse files
Adding a New Pattern
1 parent 27601b6 commit 7ef1fbe

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

patterns.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
else:
7979
print(j, end=' ')
8080
print()
81+
8182
''' *****
8283
****
8384
***
@@ -89,3 +90,27 @@
8990
print("*", end="")
9091
else :
9192
print()
93+
94+
'''
95+
*
96+
*
97+
*
98+
*
99+
* * * * * * * * *
100+
*
101+
*
102+
*
103+
*
104+
'''
105+
rows = int(input("Enter Desired Number of Rows for the Pattern : "))
106+
c = 1
107+
while(c < rows*2):
108+
r = 1
109+
while(r < rows*2):
110+
if c == rows or r == rows:
111+
print('* ', end = '')
112+
else:
113+
print(' ', end = ' ')
114+
r = r + 1
115+
c = c + 1
116+
print("")

0 commit comments

Comments
 (0)