Can anyone please tell the python program for this..
pls do as soon as possible
Attachments:
Answers
Answered by
2
series_1 = lambda x, n: sum([x ** j for j in range(1, n + 1)])
series_2 = lambda x, n: sum([x ** j / j for j in range(1, n + 1)])
x, n = list(map(int, input("enter x & n: ").split()))
print("\n".join([f"series_1: {series_1(x, n)}", f"series_2: {series_2(x, n):.2f}"]))
Similar questions