Computer Science, asked by siddhantahuja01, 8 months ago

pls tell what is wrong in this code #WAPP to print the sum of the following series 1-X+X^2-X^3+ . . . . +-X^n-1 X=float(input("Enter the base number:")) N=int(input("Enter the number of terms:")) N1=0 N2=1 s_pos=0 s_neg=0 s=0 while N1

Answers

Answered by Anonymous
1

Answer:

Logic to find factors of a number consists of below steps.

Loop from 1 till the number.

In every iteration divide the number whose factors need to be determined by current loop counter and check the remainder of division.

If the remainder is zero, then the current loop counter is a factor of given number else not.

Similar questions