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

User JackHang
by
7.9k 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
8.0k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.