write a program in Python to print the sum of the following series: s=1+x+x^2+x^3+.....+x^n
Answers
Answered by
0
Your answer will be
Is the 1
Answered by
0
Answer:
n=int(input('write no. of terms '))
x=int(input('write value of x '))
sum=1
while n>0:
sum=sum+x(star)(star)n
n=n-1
print(sum)
explanation:
star = asterisk
Similar questions