human
Write me a code to sum of the Series 1 + x / 1 + x ^ 2 / 2 + x ^ 3 / 3 + given the following:
Sum of the Series 1 + x / 1 + x ^ 2 / 2 + x ^ 3 / 3 + . . + x ^ n / n | Function to print the sum of the series.
Driver Code"
How can the above be solved in Python?
assistant
#Here is code to sum of the Series 1 + x / 1 + x ^ 2 / 2 + x ^ 3 / 3 + .
 def SUM ( x , n ) :
	total = 1
	for i in range ( 1 , n + 1 ) :
		total = total + ( ( x ** i ) / i )
	return total
x = 2
n = 5
s = SUM ( x , n )
print ( round ( s , 2 ) )