Dec-17-2020, 02:20 PM
Hello everyone,
I'm trying to do a christmas tree but I encouter some problems...
Could you please help me remove the space and put it neatly ?
Thanks !
I'm trying to do a christmas tree but I encouter some problems...
stairs = int(input("Number of stairs for the Christmas Tree :")) space = " " star = "*" stars = " * " stars_branch = " | " nbre_line = stairs*4 nbre_line_star = 7 size = nbre_line - 1 nom_ligne = 0 space = " " def stairs_tree(a) : size = nbre_line - 1 - i for line in range(5): nbre_branch = 2*a * line - 1 print(space * size + star * nbre_branch) size -= 1 for i in range( stairs +1) : stairs_tree(i) size = nbre_line -1And I find this: *
////////*** ///////***** //////******* ////////*** ///////******* //////*********** /////*************** ///////***** //////*********** /////*****************(don't mind the slash)
Could you please help me remove the space and put it neatly ?
Thanks !