Python 3 - Hollow Rectangle
I have an assignment, where we have to write a module to create certain hollow shapes and use them later on in the assignment. I'm having a slight issue with the alignment of the l
Solution 1:
print('*' + gap*width +'*')
This will print a line of size width+2
. width
spaces, and two stars.
If you want the line to be size width
, then print two fewer spaces.
print('*' + gap*(width-2) +'*')
Post a Comment for "Python 3 - Hollow Rectangle"