Series 4 ======== Consider the following mathematical succession: :math:`x_0 = 7` :math:`x_1 = 3` :math:`x_{n+1} = \frac{2*x_n+x_{n-1}}{3}` It is well know that this succession converges to 4.0. Implement the following Python function in the :mod:`series4` module (file :file:`series4.py`): .. py:function:: series4(eps, r) such that *given* - `eps`, a :class:`float` such that `0 < eps < 1`. - `r`, an :class:`int` **returns** the list of all terms of the succession that are more than `eps` apart from 4.0. The terms to be included in the list must be rounded to ``r`` decimals (notice that the rounding should always be done after the comparison). Desa la funció al fitxer ``series4.py`` i puja'l a Atenea. Els següents doctests mostren exemples del que ha de fer la funció: For exemple: .. literalinclude:: series4-test.txt :language: python3 :lines: 3-8 Doctests are available at the :download:`series4-test.txt ` file.