6 Albhabet Patterns program with for loop Using Python

# ALPHABET - A

n=int(input("Enter the number :")) # get the number of rows and columns
for row in range(n):         # iterates for n-1 times
    for col in range(n-2):
        if((col==0 or col==n-3 )and row!=0 )  or (row==0 or row==n//2 ) and 
(col>0 and col<n-3):
            print("*",end='')  #  * can be replace with any symbols you like
        else:
            print(" ",end=' ')   # prints empty spaces when if condition fails 

    print()
#  ALPHABET  - B

n=int(input("Enter the number :"))  # get the number of rows and columns
for row in range(n):      # iterates for n-1 times
    for col in range(n-2):
            if(col==0) or (col==n-3 and (row!=0 and row!=n//2 and row!=n-1)) or ((row==0 or row==n//2 or row==n-1 )   and (col>0 and col<n-3)):
                print("* ",end='') #  * can be replace with any symbols you like
            else:
                print("  ",end=' ') # prints empty spaces when if condition fails 

    print()
#  ALPHABET  - C

n=int(input("Enter the number :"))  # get the number of rows and columns
for row in range(n):   # iterates for n-1 times
    for col in range(n-2):
        if(col==0 and row!=0 and row!=n-1) or ((row==0 or row==n-1 ) and(col>0)):
            print("*",end="")   # * can be replace with any symbols you like
        else:
            print(" ",end=" ")  # prints empty spaces when if condition fails 

    print()
#  ALPHABET - D
n=int(input("Enter the number :"))  # get the number of rows and columns
for row in range(n):   # iterates for n-1 times
    for col in range(n-2):
        if(col==0)or(col== n-3 and row!=0 and row!=n-1) or ((row==0 or row==n-1) and(col>0 and col<n-3)):
            print("* ",end="")   # * can be replace with any symbols you like
        else:
            print("  ",end=" ")  # prints empty spaces when if condition fails

    print()
#  ALPHABET - E

n=int(input("Enter the number :"))  # get the number of rows and columns
for row in range(n):       # iterates for n-1 times
    for col in range(n-2):
        if(col==0)or ((row==0 or row==n//2 or row==n-1) and col>0):
            print("* ",end="")  # * can be replace with any symbols you like
        else:
            print("  ",end=" ")   # prints empty spaces when if condition fails

    print()
# ALPHABET - F

n=int(input("Enter the number :"))  # get the number of rows and columns
for row in range(n):       # iterates for n-1 times
    for col in range(n-2):
        if(col==0)or ((row==0 or row==n//2)and col>0):
            print("* ",end="")   # * can be replace with any symbols you like
        else:
            print("  ",end=" ") # prints empty spaces when if condition fails

    print()

Join our team, where career growth knows no limits.

For More Details

Our internship program guarantees personalized attention for optimal career development in the tech industry.

+91 97879 68375

-> You should bring your own laptop during the internship

Who can apply?

Internships are open for students who: B.E / B.Tech / M.E / M.Tech / B.Sc / M.Sc / M.C.A / B.C.A / Diploma.

  • Ongoing Students Only
  • days, 5days/ 10days or Based on Student Preference
  • Limited 1 to 10 students per slot
  • Registration fees : 1000 INR
  • Slots are filling quickly only fewer slots are available