For this Question: Given a number N, you need to check whether the given number is <b>Palindrome</b> or not. A number is said to be Palindrome when it reads the same from backward as forward.User task:
Since this is a functional problem you don't have to worry about the input. You just have to complete the function <b>isPalindrome()</b> which contains N as a parameter.

<b>Constraints:</b>
1 <= N <= 9999You need to return "true" is the number is palindrome otherwise "false".Sample Input:
5

Sample Output:
true

Sample Input:
121

Sample Output:
true, I have written this Solution Code: def isPalindrome(N):
    sum1 = 0
    rev = N
    while(N > 0):
        digit = N%10
        sum1 = sum1*10+digit
        N = N//10
    if(rev == sum1):
        return True
    return False, In this Programming Language: Python, Now tell me if this Code is compilable or not?