File tree 2 files changed +28
-49
lines changed
2 files changed +28
-49
lines changed Original file line number Diff line number Diff line change @@ -214,6 +214,21 @@ if __name__ == '__main__':
214
214
n = int(input())
215
215
print_rangoli(n)
216
216
```
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
+ ```
217
232
218
233
---
219
234
Original file line number Diff line number Diff line change 50
50
},
51
51
{
52
52
"cell_type" : " code" ,
53
- "execution_count" : 2 ,
54
- "metadata" : {
55
- "pycharm" : {
56
- "is_executing" : false
57
- }
58
- },
53
+ "execution_count" : 1 ,
54
+ "metadata" : {},
59
55
"outputs" : [
60
56
{
61
57
"name" : " stdout" ,
58
+ "output_type" : " stream" ,
62
59
"text" : [
63
- " ABd1234@1 \n "
64
- ],
65
- "output_type" : " stream "
60
+ " aaaaa \n " ,
61
+ " \n "
62
+ ]
66
63
}
67
64
],
68
65
"source" : [
121
118
},
122
119
{
123
120
"cell_type" : " code" ,
124
- "execution_count" : 3 ,
125
- "metadata" : {
126
- "pycharm" : {
127
- "is_executing" : false
128
- }
129
- },
130
- "outputs" : [
131
- {
132
- "name" : " stdout" ,
133
- "text" : [
134
- " ABd1234@1\n "
135
- ],
136
- "output_type" : " stream"
137
- }
138
- ],
121
+ "execution_count" : null ,
122
+ "metadata" : {},
123
+ "outputs" : [],
139
124
"source" : [
140
125
" def check(x):\n " ,
141
126
" cnt = 6 <= len(x) and len(x) <= 12\n " ,
176
161
},
177
162
{
178
163
"cell_type" : " code" ,
179
- "execution_count" : 4 ,
180
- "metadata" : {
181
- "pycharm" : {
182
- "is_executing" : false
183
- }
184
- },
185
- "outputs" : [
186
- {
187
- "name" : " stdout" ,
188
- "text" : [
189
- " ABd1234@1\n "
190
- ],
191
- "output_type" : " stream"
192
- }
193
- ],
164
+ "execution_count" : null ,
165
+ "metadata" : {},
166
+ "outputs" : [],
194
167
"source" : [
195
168
" import re\n " ,
196
169
" \n " ,
304
277
"nbconvert_exporter" : " python" ,
305
278
"pygments_lexer" : " ipython3" ,
306
279
"version" : " 3.7.6"
307
- },
308
- "pycharm" : {
309
- "stem_cell" : {
310
- "cell_type" : " raw" ,
311
- "source" : [],
312
- "metadata" : {
313
- "collapsed" : false
314
- }
315
- }
316
280
}
317
281
},
318
282
"nbformat" : 4 ,
319
283
"nbformat_minor" : 4
320
- }
284
+ }
You can’t perform that action at this time.
0 commit comments