Write a python program that generate four terms of an AP by providing initial and steps values to a function that returns the first four terms of the series.
No spam pls
Answers
Answered by
2
Answer:
def retSeries(init, step ):
return init, init + step, init + 2 * step, init + 3 * step
ini = int(input("Enter initial value of the AP series : "))
st = int(input("Enter step value of the AP series : "))
print("Series with initial value", ini, "& step value", st, "goes as:")
t1, t2, t3, t4 = retSeries(ini, st)
print(t1, t2, t3, t4)
Explanation:
I hope this is helpful for you.
Answered by
1
Answer:
This Python program allows the user to enter the first value, the total number of items in a series, and the common difference. Next, Python finds the sum of the Arithmetic Progression Series.
Explanation:
This Python Sum of the A.P program is the same as the above. Here, we used While Loop to display the A.P series, which is optional.I
Attachments:
Similar questions
Physics,
3 hours ago
English,
3 hours ago
Math,
3 hours ago
Computer Science,
5 hours ago
Biology,
7 months ago