Computer Science, asked by mb092298, 11 months ago

Write a program using nested loop to produce a rectangle of *'s with 6 rows and 20 *'s per row in python

Answers

Answered by deepaksingh70p
3

Answer:

Program to print hollow rectangle or square star patterns

Hollow rectangle star pattern :

The task is print below hollow pattern of given dimension.

********************

*                  *

*                  *

*                  *

*                  *

********************

Explanation:

Input number of rows and columns.

For rows of rectangle run the outer loop from 1 to rows.

for (i = 1; i < = rows; i++)

For column of rectangle run the inner loop from 1 to columns.

for (j = 1; j < = columns; j++)

Print star for first or last row or for first or last column, otherwise print blank space.

After printing all columns of a row, print new line after inner loop.

Answered by satyamkumar5428
0

********************

* *

* *

* *

* *

Explanation:

☝️This is the answer

Similar questions