Symbols Patterns Programs Using Python

#------------------------------ Left Arrow head ------------------------------------

x=int(input("enter the number: ")) # get the numbers of row from user 
for i in range(x): # range from 0 to n-1 
    print("  "*(x-i-1)+"*"*(i+1)) # prints "*" for i+1 times ," " for x-i-1 times
for i in range(x-1): # range from 0 to n-2
    print("  "*(i+1)+"*"*(x-i-1))  # prints " " for i+1 times ,"*" for x-i-1 times

#------------------------------ Left Triangle ------------------------------------

x=int(input("enter the number: ")) # Getting  numbers of row from user
for i in range(x):# range from 0 to n-1 
    print("  "*(x-i-1)+"* "*(i+1)) # prints "* " for i+1 times ," " for x-i-1 times
for i in range(x-1):
    print("  "*(i+1)+"* "*(x-i-1)) # prints "* " for i+1 times ," " for x-i-1 times

#------------------------------ Bottom hollow Triangle -------------------------------


a=int(input("enter the Number: "))
for i in range(a):
    print("  "*i+'* ',end=" ") # prints " " for i times along with "*"  

    if i!=a-1 or i==5:
        print("  "*(2*a-2*i-3)+"*",end=" ")#prints " "for 2a-2i-3 times along with "*" 

    print()


#---------------------------------- Hollow Rhombus -----------------------------------

a=int(input("enter the number: "))
for i in range(a):
    print('  '*(a-i-1)+'* ',end=" ") # prints " " for a-i-1 times along with "*" 

    if i >=1:
        print('  '*(2*i-1)+"*",end=' ')  # prints " " for 2i-1 times along with "*"

    print()               
    continue

for i in range(a):
    print("  "*i+'* ',end=" ") # prints " " for i times along with "*" 

    if i!=a-1:
       print("  "*(2*a-2*i-3)+"*",end=" ") #prints " "for 2a-2i-2 times along with "*" 

    print()
#------------------------------ Top hollow Triangle -------------------------------


a=int(input("enter the number: "))
for i in range(a):
    print('  '*(a-i-1)+'* ',end=" ") # prints " " for a-i-1 times along with "*" 
    if i >=1:
        print('  '*(2*i-1)+"*",end=' ')# prints " " for 2i-1 times along with "*"
    print()               
#------------------------------ Rigth Triangle -------------------------------------

a=int(input("enter the number: "))
for i in range(a):
    print(" *"*(i+1)) # prints " *" for i+1 times 

for i in range(a-1):
    print(" *" * (a-i-1)) # prints " *" for a-i-1 times 
#------------------------- Square rows and columns ---------------------------------- 

x=int(input("enter the number:"))
for i in range(x):
    print("# "*x)   # prints "# " for x times
#------------------------ Descending order of characters ----------------------------

n=int(input("Enter the number: "))
for i in range(n):
    print(chr(64+n-i),end=' ') # prints the character value at 64+n-i 
    for j in range(i+1):
        print(''*(n-i-1),end=' ') # prints " " for n-i-1 times
    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