in Education by
write a program in Python to print the sum of the following series: s=1+x+x^2+x^3+…..+x^n Select the correct answer from above options

1 Answer

0 votes
by
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

Related questions

0 votes
    write a program in python to obtain 3 numbers and print their sum. Select the correct answer from above options...
asked Nov 29, 2021 in Education by JackTerrance
0 votes
    Write a python program to print first n(entered by user) even natural numbers. Select the correct answer from above options...
asked Dec 25, 2021 in Education by JackTerrance
0 votes
    Develop a java program that will print the series (16*1)+(14*2)…(4*7)..Only ANEEK MITRA WILL ANSWER! Select the correct answer from above options...
asked Nov 26, 2021 in Education by JackTerrance
0 votes
    How to write a program in JAVA to print the sum of ASCII values of a particular word input ? Select the correct answer from above options...
asked Dec 28, 2021 in Education by JackTerrance
0 votes
    write a program to print fibonacci series . write a program to search an element within the array using binary search Select the correct answer from above options...
asked Dec 29, 2021 in Education by JackTerrance
0 votes
    Write instruction in interactive mode for the following: (i) to display sum of 8,9.0,2*3 (ii) to print sum of 8,9.0,2*3 Select the correct answer from above options...
asked Dec 2, 2021 in Education by JackTerrance
0 votes
    Question No.1: What do you understand about container tag and empty tag, give example? Question No.2: What do ... all the attributes? Select the correct answer from above options...
asked Nov 29, 2021 in Education by JackTerrance
0 votes
    Write a program in python to insert ten friends name in a list, then print 3rd, 5th and 9th value from the list (using data structure) Select the correct answer from above options...
asked Dec 14, 2021 in Education by JackTerrance
0 votes
    Write a C program to print the following pattern: 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1 Select the correct answer from above options...
asked Dec 7, 2021 in Education by JackTerrance
0 votes
    Write a C program to print the following pattern: 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1 Select the correct answer from above options...
asked Dec 5, 2021 in Education by JackTerrance
0 votes
    Write a C program to print the following pattern: 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1 Select the correct answer from above options...
asked Nov 26, 2021 in Education by JackTerrance
0 votes
    (ii) Assign the value represented by variable N to the variable N1. (iv) Assign the sum of the two variables ... . What is nrogramming? Select the correct answer from above options...
asked Dec 1, 2021 in Education by JackTerrance
...