Fun with Patterns in Python – 3

#---------------------------- consecutive number square --------------------------------------

num = int(input("Enter a number :"))
count=0
for i in range(num):
    for j in range(num):
        count +=1
        print(count,end=' ')
    print()
#---------------------------- parallelogram or slant square ----------------------------------

num = int(input("Enter the number :"))
for i in range(num):
    for j in range(num-i):
        print("  ",end='')
    for j in range(num):
        print(" *",end='')
    print()
#---------------------------- inverted - parallelogram or slant square -----------------------

num = int(input("Enter the number: "))
for i in range(num):
    for j in range( i):
        print("  ", end='')
    for j in range(num):
        print(" *", end='')
    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