human
Recursive sum of digits of a number is prime or not | Function for recursive digit sum.
function to check if prime or not the single digit.
calls function which returns sum till single digit.
checking prime.
driver code"
How can the above be solved in Python?

=====
What is a code to recursive sum of digits of a number is prime or not and the other steps required?
assistant
#Here is code to recursive sum of digits of a number is prime or not and the other steps required.
 def recDigSum ( n ) :
	if n == 0 :
		return 0
	else :
		if n % 9 == 0 :
			return 9
		else :
			return n % 9
def check ( n ) :
	n = recDigSum ( n )
	if n == 2 or n == 3 or n == 5 or n == 7 :
		print " Yes "
	else :
		print " No "
n = 5602
check ( n )