Here's the equation
x + x^2/2 + x^3/3 +.... x^n/n
How will I find the sum of this series? x is a constant term to be entered by user and n which is power is also based on user!
I made this program but it's not working properly.. Have a look -
n=input("Enter power ")
x=input("Enter value of x")
i=0
while i<n:
c=n-1
res=(x**(n-c))/(n-(c))
print res
i=i+1
So how do we make it? Thanks a ton for your help!
Update : The answers helped me and now the program is working as it should! This was my first time using Stackoverflow! Thanks to everyone for this.