Hollow diamondpattern

My code is passing the first test case but it fails another test case. can you go through my code.

@Saksham_Agarwal you have shared the wrong code

I’m so sorry for that. This is my new code. I think I have to use same loops for same pattern and different condition for those in which there is no similar cases.

@Saksham_Agarwal dry run your code for 7

I am really sorry for asking help in this question. I had already solved this question on hackerblocks before attempting it in course. I was trying to use the Swastik pattern approach in this. Now its already solved

@Saksham_Agarwal its okay .mark your doubt as resolved and rate as well :slight_smile: