Pattern 7 problem sheet

this is the output of the pattern number 7 in problem sheet of pattern. i have posted the image of code in previous doubt . kindly tell my mistake