Series ====== Let's consider the following mathematical succession parameterized by the real number constant :math:`a`: .. math:: x_{i+1} = \frac{-1^{i+1} a sin(x_i)}{x_i/2} Implement the following two Python functions (following the order is recommended) in the module :mod:`series12` (file :file:`series12.py`). The first function is: ``calc_term``:math:`(a, i, x_i)` | takes | :math:`a`, :class:`float` value, | :math:`i`, positive :class:`int` value, | :math:`x_i`, :class:`float` value representing an angle expressed in radians | returns | :math:`x_{i+1}` according to the above definition, as a :class:`float` value rounded to 4 decimals. For exemple: .. literalinclude:: calc_term-test.txt :language: python3 :start-after: --ini :end-before: --fi .. note:: Python standard modules such as :mod:`math` **may** be imported and used. Doctests are available at the :download:`calc_term-test.txt` file. The second function is: ``sum4terms``:math:`(a, x_0)` | takes :math:`a, x_0`, :class:`float` values where :math:`x_0` is the first term of the succession | returns a :class:`float` with the addition of the first 4 terms of the above succession, being :math:`x_0` the first of them. The float is rounded to 2 decimals. For exemple: .. literalinclude:: sum4terms-test.txt :language: python3 :start-after: --ini :end-before: --fi .. note:: This function implementation **must** call the previous function as many times as needed. Doctests for validation are available at the :download:`sum4terms-test.txt` file.