Friday, July 17, 2020

A Tree Planter Python Program [FREE CODE]

*****
This  Short n Sweet Python Program plants a Virtual Tree made up of  English Alphabets. Great Learning for Kids :)
*****

n = int(input("Enter Alphabets Tree Height:"))
if n <=26:
    j = 1
    for x in range(0,n):
        for y in range(n,x,-1):
            print(" ", end="")
        print(chr(x+65) * j, end="")
        j = j+2
        for w in range(n,x,-1):
            print("",end="")
        print()
else:
    print("English Language has only 26 Alphabets. Enter accordingly.")