Calculate Sum of Alternating Series in Python

Prompt

Result