For this Question: Given an integer n, your task is to print the pattern as shown in example:-
For n=5, the pattern is:
1
1 2 1
1 2 3 2 1
1 2 3 4 3 2 1
1 2 3 4 5 4 3 2 1
1 2 3 4 3 2 1
1 2 3 2 1
1 2 1
1<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_making()</b> that takes the integer n as parameter.

Constraints:-
1 <= n <= 100Print the pattern as shown.Sample Input:-
5

Sample output:-
1
1 2 1
1 2 3 2 1
1 2 3 4 3 2 1
1 2 3 4 5 4 3 2 1
1 2 3 4 3 2 1
1 2 3 2 1
1 2 1
1

Sample Input:-
2

Sample Output:-
1
1 2 1
1, I have written this Solution Code: def pattern_making(n): 
      
   
    for i in range(1, n+1): 
       
        for j in range(1, i+1): 
          
             
            print(j,end=" ") 
       
        for j in range (1,i):
            print(i-j,end=" ")
        print("\r") 
    i=n-1
    while i>=1 :
       
        for j in range(1, i+1): 
          
             
            print(j,end=" ") 
       
        for j in range (1,i):
            print(i-j,end=" ")
        print("\r")
        i=i-1
  , In this Programming Language: Python, Now tell me if this Code is compilable or not?