Nov-18-2018, 08:03 AM
remove line #3
i.e. you try to use print_spruce() before it is defined.
Even better
i.e. you try to use print_spruce() before it is defined.
Even better
def print_spruce(n): for size in range(1, n+1, 2): print((size * "X").center(n)) n = int(input("Write the size of the spruce:")) print_spruce(n)
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs