Skip to content

Commit ff69822

Browse files
authoredNov 14, 2022
Update patterns.py
1 parent dec6057 commit ff69822

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
 

‎patterns.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,26 @@
153153
else:
154154
print(' ', end = '')
155155
print()
156+
157+
"""
158+
* *
159+
* *
160+
* *
161+
* *
162+
*
163+
* *
164+
* *
165+
* *
166+
* *
167+
"""
168+
rows = int(input("Enter X Pattern Odd Rows = "))
169+
170+
print("X Star Pattern")
171+
172+
for i in range(0, rows):
173+
for j in range(0, rows):
174+
if(i == j or j == rows - 1 - i):
175+
print('*', end = '')
176+
else:
177+
print(' ', end = '')
178+
print()

0 commit comments

Comments
 (0)
Please sign in to comment.