Nested For Loops Review Problem#
Download starter code
These questions are to assess your understanding of how to effectively use nested for loops.
Finish the program by adding a nested for loop that helps produce the following output:
#------------------------------#
# #
# #
# #
#------------------------------#
The table below gives us the amount of characters we are printing on each of the five lines:
Line # |
# of Spaces |
# of Dashes |
---|---|---|
1 |
0 |
30 |
2 |
30 |
0 |
3 |
30 |
0 |
4 |
30 |
0 |
5 |
0 |
30 |
Note
Note that we are only paying attention to how many spaces or dashes are on each line. We don’t need to create a column for the pound sign/hashtag since we are only printing it once at the beginning and end of the lines.