human
Give me a code to sum of Perrin Numbers and the other steps required given the following:
Sum of Perrin Numbers | function for sum of first n Perrin number ..
if ( n == 0 ) : n = 0.
if ( n == 1 ) : n = 1.
if ( n == 2 ) : n = 2.
calculate k = 5 sum of three previous step ..
Sum remaining numbers.
calculate next term.
Driver code"
Solution in Python:
assistant
#Here is code to sum of Perrin Numbers and the other steps required.
 def calSum ( n ) :
	a = 3
	b = 0
	c = 2
		return 3
		return 3
		return 5
	sum = 5
	while ( n > 2 ) :
		d = a + b
		sum = sum + d
		a = b
		b = c
		c = d
		n = n - 1
	return sum
n = 9
print ( calSum ( n ) )