Size = int(input("what is the size of the box "))
def Stars(Size):
for x in range(0, Size):
for y in range(0, Size):
print("*",end="")
Stars()
OUTPUT (if the size of the box was 4)
****
*==*
*==*
****
for the first and last line, they should be outside the loop. Then you can create the loop normally,
def stars(x):
print('*'*x)
for i in range(1,x-1):
print('*'+'='*(x-2)+'*')
print('*'*x)
stars(4)
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments