Python - paint a tree HW
<p>I need to make a tree from *, the height need to be the number the user insert with 2 more * for extra row, and the brunk 1/3 of it.</p>

<p>In addition, the last row need to be with no space before.
I made the whole code, but the last and longest row appear with one space before..</p>

<p>where am I worong?</p>

<pre><code>print "Enter tree height:"
height=input()
i=1
space=height-1
while i&lt;=2*height:


    print space*" ",i*"*"
    i=i+2
    space=space-1

trunk=height/3
j=0

while j&lt;trunk:
    print (height-1)*" ","*"
    j=j+1
</code></pre>

<p>output:</p>

<pre><code>Enter tree height: 3
  *
 ***
*****
  *
Enter tree height: 8
       *
      ***
     *****
    *******
   *********
  ***********
 *************
***************
       *
       *
</code></pre>
