+ 2
I want to Print the pattern using dual for loops In python...pattern:5,4,3,2,1\n5,4,3,2\n5,4,3\n5,4\n5
for loop easy pattern
8 Answers
+ 9
well , I am not a python boy [not started yet]
//I tried making a code ... might taken more lines than req.
//hope it helped now āŗ
https://code.sololearn.com/csH6h33t52xr/?ref=app
+ 8
U mean u can do only increment in possible
//okh , I have a solution for that also
1) ... same as i mentioned in above comment
2)run a loop from k=1 to k=5-n+1 ... print 5-k+1 for each iteration
3)...same as i mentioned in above comment
//good luck ... by making 5-6 different patterns ... u'll be able to do these pattern questions very very easily
+ 6
1) see that u need 5 rows ... therefore run a loop from n=1 to n=5
2) for each outer loop u need to make a loop from k=5 to k=n
3) just after inner loop ends , puts aprint statement to get to next line
// and pattern will be ready āŗš
+ 1
i tried Bro all the ways But the thing is In for loop range is not accepting n to 0 and hence output is blank
+ 1
ok will try btw i m new to python so...
+ 1
bro its not working can u send me the code ty
+ 1
thanks Buddy
0
thanks Jay mathews šā„ļø