Solve Problems by Coding Solutions - A Complete solution for python programming
def binaryPallindrome(num):
binary = bin(num)
binary = binary[2:]
return binary == binary[-1::-1]
if __name__ == "__main__":
num = 9
print (binaryPallindrome(num))
Post a Comment
No comments:
Post a Comment