human
Tribonacci Numbers | A DP based Python 3 program to print first n Tribonacci numbers ..
Driver code"
Solution in Python:
assistant
#Here is code to tribonacci Numbers and the other steps required.
 def printTrib ( n ) :
	dp = [ 0 ] * n
	dp [ 0 ] = dp [ 1 ] = 0 ;
	dp [ 2 ] = 1 ;
	for i in range ( 3 , n ) :
		dp [ i ] = dp [ i - 1 ] + dp [ i - 2 ] + dp [ i - 3 ] ;
	for i in range ( 0 , n ) :
		print ( dp [ i ] , " ▁ " , end = " " )
n = 10
printTrib ( n )