I'm attempting to create a number square when it's using a parameter. Whatever the user enters in the parameter it will display something like this (using 4 as an example):
I've come up this so far:
def numberedSquare(n): for a in range(n, 0, -1): print(a, end="\n") for i in range(n+1, 0+1, -1): print(i, end="\n") for j in range(n+2, 0+2, -1): print(j, end="\n") for f in range(n+3, 0+3, -1): print(f, end="\n")
Obviously the "\n" forces a new line but either way it still doesn't line up next to eachother. Now I'm thinking nested loops, but when I do, the numbers go crazy and so does the length of the square. :S
What am I missing?