human
What is a code to check whether the given floating point number is a palindrome and the other steps required given the following:
Check whether the given floating point number is a palindrome | Function that returns true if num is palindrome.
Convert the given floating point number into a string.
Pointers pointing to the first and the last character of the string.
Not a palindrome.
Update the pointers.
Driver code"
How can the above be solved in Python?
assistant
#Here is code to check whether the given floating point number is a palindrome and the other steps required.
 def isPalindrome ( num ) :
	s = str ( num )
	low = 0
	high = len ( s ) - 1
	while ( low < high ) :
		if ( s [ low ] != s [ high ] ) :
			return False
		low += 1
		high -= 1
	return True
n = 123.321
if ( isPalindrome ( n ) ) :
	print ( " Yes " )
else :
	print ( " No " )