Python program to print Arithmetic Progression series

Python program to print Arithmetic Progression series

In this, we discuss Arithmetic Progression series and check this series in Python Programming.

So this case, first of all we have to follow these steps to write the code.
Given first term (a), 
common difference (d)
a integer n of the Arithmetic Progression series, 
the task is to print the series.

After we use while loop to print the series. If you don't know about looping concept check the link given below first.

This Python program allows the user to enter the initial value, number of sequences, and the standard deviation. Next, Python receives a Arithmetic Progression Series.


Python Series A.P.


Arithmetic Series is a sequence of words in which the following object is obtained by adding a common difference to the previous object. Or the A.P. a series of numbers in which the difference of two consecutive numbers remains the same. These differences have called for a general difference.

In mathematics after calculating the Arithmetic Progression Series

Tn's A.P. Series: Tn = a + (n - 1) d

According to Wikipedia, arithmetic progression (AP) is such a sequence of numbers that the differences of any two consecutive members are permanent. For example, sequences 3, 5, 7, 9, 11, 13,. . . development of arithmetic and standard deviation 2. 

In this case, we will limit the continuity of arithmetic whose general variance is zero. On the other hand, geometric progression (GP) is a sequence of numbers in which each term after the first is obtained by multiplying the previous one by a non-zero number set by the so-called standard measure. 

For example, sequences 2, 6, 18, 54,. . . progression of Geometry by standard measure 3. With this problem, we will limit him to geometric continuity whose standard is a non-zero sum.


Now take a look at Python program to print Arithmetic Progression series


Python Code:

a = int(input('enter first term'))
d = int(input('enter common difference'))
n = int(input('enter number of terms'))
print('AP series as follows')
m = 1while(m<=n):
    tm = a + (m-1)*d
    print(tm)
    m = m+1
Output:
enter first term 1
enter common difference 2
enter number of terms 4
AP series as follows
1
3
5
7