Answers for "print a box like the ones below"

0

print a box like the ones below

length = int(input("Enter the side of the square  : "))

for i in range(length):
    for j in range(length):
        if(i == 0 or i == length - 1 or j == 0 or j == length - 1):
            print('*', end = ' ')
        else:
            print(' ', end = ' ')
    print()
Posted by: Guest on September-24-2021

Code answers related to "print a box like the ones below"

Browse Popular Code Answers by Language