human
Print a number containing K digits with digital root D | Function to find a number.
If d is 0 , k has to be 1.
Print k - 1 zeroes.
Driver code"
Solution in Python:
 What is a code to print a number containing K digits with digital root D and the other steps required?
assistant
#Here is code to print a number containing K digits with digital root D and the other steps required.
 def printNumberWithDR ( k , d ) :
	if d == 0 and k != 1 :
		print ( - 1 , end = " " )
	else :
		print ( d , end = " " )
		k -= 1
		while k :
			print ( 0 , end = " " )
			k -= 1
if __name__ == " _ _ main _ _ " :
	k , d = 4 , 4
	printNumberWithDR ( k , d )