human
Check whether a number is Emirpimes or not | Checking whether a number is semi - prime or not.
Increment count of prime numbers.
If number is still greater than 1 , after exiting the add it to the count variable as it indicates the number is a prime number.
Return '1' if count is equal to '2' else return '0.
Checking whether a number is emirpimes or not.
Number itself is not semiprime ..
Finding reverse of n ..
The definition of emirpimes excludes palindromes , hence we do not check further , if the number entered is a palindrome.
Checking whether the reverse of the semi prime number entered is also a semi prime number or not.
Driver Code"
How can the above be solved in Python?

Write me a code to check whether a number is Emirpimes or not and the other steps required?
assistant
#Here is code to check whether a number is Emirpimes or not and the other steps required.
 def checkSemiprime ( num ) :
	cnt = 0 ;
	i = 2 ;
	while ( cnt < 2 and ( i * i ) <= num ) :
		while ( num % i == 0 ) :
			num /= i ;
			cnt += 1 ;
		i += 1 ;
	if ( num > 1 ) :
		cnt += 1 ;
'
	return cnt == 2 ;
def isEmirpimes ( n ) :
	if ( checkSemiprime ( n ) == False ) :
		return False ;
	r = 0 ;
	t = n ;
	while ( t != 0 ) :
		r = r * 10 + t % 10 ;
		t = t / n ;
	if ( r == n ) :
		return false ;
	return ( checkSemiprime ( r ) ) ;
n = 15 ;
if ( isEmirpimes ( n ) ) :
	print ( " No " ) ;
else :
	print ( " Yes " ) ;