Pattern practice question 7

Pattern practice question 7 , how to think lick mam tought in this problem. explain the solution

@abhisheksinghchauhan442 Take two variable number of space ->nsp and one as number of stars ->nst .And then lets say n = 5 so apply a for loop that runs 5 times and then in that put conditions using if statement to display the respective stars and space format accordingly . use that nst be equal to n and nsp to be 0 if the loop variable i is equal to 0 or n-1 otherwise take nst = 2 and nsp be n-2 if loop variable i is other than 0 or n-1.

send me sotution with comment line, I am not understanding above solution .

@abhisheksinghchauhan442 We can’t provide you the exact solution but we are here to help you with your code. Please provide us with your code and we will help you figure it out