UNABLE TO BUILD LOGIC FOR 7 AND 8 PATTERN PLZ HELP?

MY DOUBT GET DISAPPEARED AFTER FEW SECONDS OF POSTING

Hey @Rohan-Duggal-1255727097955490,

In the 7th problem, we need to print " * " at the start and end column of each row and if we are at the first or the last row we need to print " * " for every column in between else we need to print " ".

In the 8th problem, we need to print star only on the diagonals. The condition of diagonal is that either col==row or col=n-row+1. So for these 2 conditions we need to print a " * ", else we need to print a " ".

Hope it helps :slight_smile:

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.

i understand the condition of pattern 8 but can you not able to code pattern 7 can you plz tell pattern 7 code

i understand the condition of pattern 8 but not able to code pattern 7 can you plz tell pattern 7 code

Hi @Rohan-Duggal-1255727097955490

Please open a new doubt for this one. This was resolved.
Also marking it as resolved.