198k views
0 votes
Nested loops: Print rectangle Given the number of rows and the number of columns, write nested loops to print a rectangle. Sample output with inputs: 23 * * * 1 num_rows = int(input) 2 num_cols = int(input) 1 test passed VOUAWNP " Your solution goes here" print('*', end='') print All tests passed Run CHALLENGE ACTIVITY 5.8.2: Nested loops: Print seats. Given num_rows and num_cols, print a list of all seats in a theater. Rows are numbered, columns lettered, as in 1A or 3E. Print a space after each seat. Sample output with inputs: 23 1A 1B 1C 2A 2B 2C 1 num_rows = int(input) 2 num_cols = int(input) 1 test passed # Note 1: You will need to declare more variables 5 # Note 2: Place end=' ' at the end of your print statement to separate seats by spaces 7" Your solution goes here" All tests passed 9 print Run

User SeanLabs
by
5.3k points

1 Answer

4 votes

Answer:

See attachment

Step-by-step explanation:

The solution and the explanation could not be submitted directly. So,I added both as attachments

Nested loops: Print rectangle Given the number of rows and the number of columns, write-example-1
Nested loops: Print rectangle Given the number of rows and the number of columns, write-example-2
User Anil Sivadas
by
4.9k points