Doubt regarding spaces in patterns

In this question are we required to leave a single space between characters and double spaces where they are to be left intentionally or single spaces in both the cases. Using single spaces between characters as well as where they are required is messing up my patterns

this is correct

when character is present 1 space
when no character 2 spaces

i just submitted my code and it worked although the sixth row was looking different than the pattern given in the diagram. Why is it so?

hey in ur submission i see u got 100% points
are u still struggling with the issue
if yes provide the code in cb ide