Skip to main content
Question

print Pattern

  • October 26, 2025
  • 5 replies
  • 70 views

Forum|alt.badge.img+1

I want to Print a pattern if the input is 5 

then print 

A B 

1 2 3 

A B C D 

1 2 3 4 5  like this 

anyone can help me like how to print A B C D 

5 replies

Aaron.Gleason
Automation Anywhere Team
Forum|alt.badge.img+14
  • Automation Anywhere Team
  • October 26, 2025

@rishav_anand Use Python. 

n = int(input("Enter a number: "))

for i in range(1, n + 1):
if i % 2 == 1: # Odd rows = numbers
for j in range(1, i + 1):
print(j, end=" ")
else: # Even rows = letters
for j in range(1, i + 1):
print(chr(64 + j), end=" ") # chr(65) is 'A'
print() # new line after each row

 


Forum|alt.badge.img+1
  • Author
  • Cadet | Tier 2
  • October 29, 2025

@Aaron.Gleason thanks for the code but i want to print this with the help of automation anywhere without using python 

 


Aaron.Gleason
Automation Anywhere Team
Forum|alt.badge.img+14
  • Automation Anywhere Team
  • October 29, 2025

@rishav_anand Automation Anywhere is not a general programming language. It is a business automation language. As such, Python is a better language for this specific exercise. You can integrate Python directly into Automation Anywhere, and we frequently do for tasks such as yours that are more a programmer exercise than a business automation exercise. It’s a matter of using the right tool for the job.

That being said… it can be done…

 


Zaid Chougle
Navigator | Tier 3
Forum|alt.badge.img+17
  • Navigator | Tier 3
  • October 31, 2025

@rishav_anand Automation Anywhere is not a general programming language. It is a business automation language. As such, Python is a better language for this specific exercise. You can integrate Python directly into Automation Anywhere, and we frequently do for tasks such as yours that are more a programmer exercise than a business automation exercise. It’s a matter of using the right tool for the job.

That being said… it can be done…

 

WOAH! , that is some serious stuff ​@Aaron.Gleason 


Aaron.Gleason
Automation Anywhere Team
Forum|alt.badge.img+14
  • Automation Anywhere Team
  • October 31, 2025

@Zaid Chougle Thanks. There are some benefits to having 46 years of programming experience.  🤣

Just in case this is someone’s pre-hire exercise, I’m not going to explain some of the tricks I did here, but you might have noticed the Goto actions that I threw in just because.  😎