Starting off as a muggle that naïve to the Math's and Data Science world.

Quiz

Saw a challenge in LinkedIn about creating a tree

and here is my try =P

for i in range(5):
    print(
        ' ' * (5 - i) + #create blank space
        ''.join([ 
                  chr(65 + #ascii for A
                  abs(abs(j - i) - i) ) #generate0,1,0 or 0,1,2,1,0 
                  for j in range(i * 2 + 1) #generate1,3,5,7,9
                ])
    )

resolution from the internet.

word = "ABCDE"
for each in range(1, len(word) + 1):
    print(
        str(" " * len(word))[:-each] + #create blank space
        word[:each:] + #left 
        word[:each-1:][::-1] #right + reverse
    )

Leave a comment