Skip to content

Commit 98a0b02

Browse files
authored
Merge pull request darkprinx#43 from suggulajaswanth/patch-2
Update Day_23.md
2 parents 7433a29 + e0f2c63 commit 98a0b02

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Status/Day_23.md

+15
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,21 @@ if __name__ == '__main__':
214214
n = int(input())
215215
print_rangoli(n)
216216
```
217+
**suggula jaswanth**
218+
219+
```python3
220+
def rangoli(n):
221+
# your code goes here
222+
l1=list(map(chr,range(97,123)))
223+
x=l1[n-1::-1]+l1[1:n]
224+
mid=len('-'.join(x))
225+
for i in range(1,n):
226+
print('-'.join(l1[n-1:n-i:-1]+l1[n-i:n]).center(mid,'-'))
227+
for i in range(n,0,-1):
228+
print('-'.join(l1[n-1:n-i:-1]+l1[n-i:n]).center(mid,'-'))
229+
rangoli(5)
230+
231+
```
217232

218233
---
219234

0 commit comments

Comments
 (0)