Pattern19 Doubt Not able to print the pattern

I am not able to code for the 19th pattern in the pdf. How will it be done? The first and last line are the problem in that pattern. If they are removed. I am able to print the pattern but including them I am not able to write the code for the same.

@muskanvashisht7_0542d4b92e256d86 refer this code :

Can i also get the solution for 20th as I tried various methods but that one also I am not able to solve. Also thanks for the 19th. I spent some time and with a different approach also I solved it

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.