61.0k views
2 votes
Given the number of rows and the number of columns, write nested loops to print a rectangle.

User JackHang
by
5.1k points

1 Answer

1 vote

Answer:

You need to use a nested for loop. Use the range() builtin to produce an iterable sequence. The outer for loop should iterate over the number of rows.

Explanation:

Use the range() builtin to produce an iterable sequence. The outer for loop should iterate over the number of rows overtime.

User Marcello Miorelli
by
5.6k points