Guest User

Untitled

a guest
Jan 19th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. height = eval(input("Type in desired height of tree: ")) #get height
  2.  
  3. for level in range(1, height+1): #take from level 1 to height
  4. print(" "*(height-level), end="") #get spaces before drawing star
  5. print("*"*(2*level-1)) #draw correct star for each level
Add Comment
Please, Sign In to add comment