Related to Pattern Printing

The pattern is getting printed exactly as the sample output. But still the test cases are getting failed.

Please explain why?

Hey @divy0049_a6ee39c379311b3e Your code looks fine to me but since right now hackerblocks is under maintenance so I request your patience till hackerblocks gets back After that I will be able to clear your doubt more efficiently.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.