0

please correct this pattern code

4555 3455 2345 1234 output should be like this but the code is giving this output 4555 3455 2345 12345

19th Oct 2022, 11:04 AM
Avinash
Avinash - avatar
4 Answers
19th Oct 2022, 11:37 AM
Riya
Riya - avatar
+ 2
Mistake is in y and z range..try this
19th Oct 2022, 11:38 AM
Riya
Riya - avatar
+ 1
Riya Thank you so much
20th Oct 2022, 1:46 AM
Avinash
Avinash - avatar
0
code is here n=int(input()) for x in range(n,0,-1): for y in range(x,n+2): print(y,end='') for z in range(0,x-2): print(n+1,end='') print()
19th Oct 2022, 11:05 AM
Avinash
Avinash - avatar