human
What is a code to program to find sum of harmonic series and the other steps required given the following:
Program to find sum of harmonic series | Function to return sum of harmonic series.
Driver Code"
How can the above be solved in Python?
assistant
#Here is code to program to find sum of harmonic series and the other steps required.
 def sum ( n ) :
	i = 1
	s = 0.0
	for i in range ( 1 , n + 1 ) :
		s = s + 1 / i ;
	return s ;
n = 5
print ( " Sum ▁ is " , round ( sum ( n ) , 6 ) )