Pattern12 pattern practice sheet

I need help solving this pattern as i am having trouble finding the solution on my own.

Hey @srishti200201_c9588863a697e1e7,
The prerequisite of solving this problem is this pattern:

        *
    *   *   *
*   *   *   *   *

If you are able to print the above pattern
You can make a small change to obtain the pattern asked in the problem.

While printing the stars, we can check if the index of * in the for loop (cst value).
If the cst is an odd number we need to print a “*” else we need to print a “!”.

Hope it helps.

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.