For this Question: Given a positive integer N, your task is to print a right-angle triangle pattern of consecutive numbers of height N.
See the example for a better understanding.<b>User Task:</b>
Since this will be a functional problem, you don't have to take input. You just have to complete the function <b>pattern()</b> that takes integer n as a parameter.

Constraint:
1 <= N <= 100Print a right angle triangle of numbers of height N.Sample Input:
5

Sample Output:
1
1 2 
1 2 3
1 2 3 4
1 2 3 4 5

Sample Input:
2

Sample Output:
1
1 2, I have written this Solution Code: def patternPrinting(n):
    for i in range(1,n+1):
        for j in range (1,i+1):
            print(j,end=' ')
        print()


, In this Programming Language: Python, Now tell me if this Code is compilable or not?