Wednesday, October 28, 2015 3:31 PM

Python Nested Loops (Activity 5.8.1)

Python
Question:
Write nested loops to print a rectangle. Sample output for given program:
* * * 
* * * 
 
num_rows = 2
num_cols = 3

for i in range(num_rows):
    for j in range(num_cols):



        print('*', end=' ')
    print('')

About Unknown

Here you can share some biographical information next to your profile photo. Let your readers know your interests and accomplishments.

1 comment:

  1. im glad I found your website, please continue to put up more... thank you!!

    ReplyDelete