Python Program:

- To print full triangle pattern using alphabet

Example:

User Input: 3

Output:

    A
  A B A
A B C B A
rows=int(input("Enter number of rows : "))
for i in range(rows,0,-1):
  c=65
  for j in range(1,2*rows-i+1):
    if(j<i):
      print("  ", end="")
    else:
      if(j<rows):
        print(chr(c), end=" ")
        c+=1
      else:
        print(chr(c), end=" ")
        c-=1
  print("")

Output:

Enter number of rows: 4

      A
    A B A
  A B C B A
A B C D C B A
Program
pattern

Main Logic :

for i in range(rows,0,-1):
  c=65
  for j in range(1,2*rows-i+1):
    if(j<i):
      print("  ", end="")
    else:
      if(j<rows):
        print(chr(c), end=" ")
        c+=1
      else:
        print(chr(c), end=" ")
        c-=1
  print("")

You can print the same pattern in small alphabets, just set c=97

Concept

Coming Soon !

Quick
Tutorial

Quote

In order to carry a positive action, we must develop here a positive vision.