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

asked
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.

Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.