Write nested loops to print a rectangle. Sample output for given program:
3 stars : ***
3 stars : ***
I tried it and ended up with this:
num_rows = 2
num_cols = 3
'''IDK WHAT TO PUT HERE'''
print('*', end=' ')
print('')
Any help would be appreciated! Thanks!
Here you go! Try this!
num_rows = 2
num_cols = 3
for i in range(num_rows):
print('*', end=' ')
for j in range(num_cols-1):
i*=j
print('*', end=' ')
print('')