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 !
buran write Dec-17-2020, 03:29 PM:
Please, use proper tags when post code, traceback, output, etc.
See BBcode help for more info.
Please, use proper tags when post code, traceback, output, etc.
See BBcode help for more info.