human
Recursive sum of digits of a number formed by repeated appends | Return single digit sum of a number.
Returns recursive sum of digits of a number formed by repeating a number X number of times until sum become single digit ..
Driver Code"
How can the above be solved in Python?
 ... What is a code to recursive sum of digits of a number formed by repeated appends and the other steps required?
assistant
#Here is code to recursive sum of digits of a number formed by repeated appends and the other steps required.
 def digSum ( n ) :
	if n == 0 :
		return 0
	return ( n % 9 == 0 ) and 9 or ( n % 9 )
def repeatedNumberSum ( n , x ) :
	sum = x * digSum ( n )
	return digSum ( sum )
n = 24 ; x = 3
print ( repeatedNumberSum ( n , x ) )