Below is the program to draw the function pattern
def pattern_6(num):
# initializing value equivalent to 'A' in ASCII
# ASCII value
number = 65
# outer loop always handles the number of rows
for i in range(0, num):
# inner loop to handle number of columns
# values changing acc. to outer loop
for j in range(0, i+1):
# explicit conversion of int to char
# returns character equivalent to ASCII.
char = chr(number)
# printing char value
print(char, end=" ")
# printing the next character by incrementing
number = number +1
# ending line after each row
print("\r")
num = int(input("enter the number of rows in the pattern: "))
pattern_6(num)