width = 10 height = 5 # Print top of box print('*' * width) # Print sides of box for i in range(height - 2): print('*' + ' ' * (width - 2) + '*') # Print bottom of box print('*' * width)

Comments