I\'m to \"Write a python program that prompts the user to input a positive integer n. The program then prints a hollow rectangle with n rows and 2*n columns. For a example an in
Code:
def printStars(length):
l = ['*'*length]
l+= ['*' + ' '*(length-2) + '*'] * (length-2)
l+= ['*'*length]
return l
if __name__=='__main__':
print('\n'.join(printStars(15)))
Output:
***************
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
***************
Hope this helps :)
EDIT:Fixed Some Formatting