For this Question: Given the position of the king in an 8X8 chessboard. Your task is to find the number of positions King can go into in one move.

Note:-
Remember king can move in all eight directions but can not go outside of the chess board<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>King()</b> that takes integers X, and Y as arguments.

Constraints:-
1 <= X, Y <= 8Return the number of positions King can go into in one move.Sample Input:-
2 1

Sample Output:-
5

Explanation:-
the king can go into:- (1, 1), (3, 1), (1, 2). (2, 2), (3, 2)

Sample Input:-
4 4

Sample Output:-
8, I have written this Solution Code: import array as arr
def King(X, Y):
    a = arr.array('i', [0,0,1,1,1,-1,-1,-1]) 
    b = arr.array('i', [-1,1,1,-1,0,1,-1,0]) 

    cnt=0
    for i in range (0,8):
       if(X+a[i]<=8 and X+a[i]>=1 and Y+b[i]>=1 and Y+b[i]<=8):
           cnt=cnt+1
    return cnt
, In this Programming Language: Python, Now tell me if this Code is compilable or not?