Fidelity ======== A bank has a system for customer's loyalty. The system awards a customer with points which are based on the amount of each purchase of his/her credit card. Each month, the customer receives a notification with the accumulated number of points which can be exchanged for gifts. Points are given according to these criteria: - for an amount less than € 10: 1 point - for an amount greater than or equal to € 10: 3 points for every € 5 An amount of € 1000 or more has an additional bonus of 50 points. Save the two following functions into a file named ``fidelity.py``. #. Write the function :py:func:`compute_points` that takes a purchase amount (float), and returns the correspondig number of points (integer). See the following examples: .. literalinclude:: compute_points.txt :language: python3 :lines: 3- .. note:: More tests are provided in the :download:`compute_points.txt` file. #. Write the function :py:func:`update_points` that takes a customer number of accumulated points (integer) and a purchase amount (float), and returns the final number of accumulated points of this customer, taking into account this purchase. This function **must call the previous function** :py:func:`compute_points`. See the following examples: .. literalinclude:: update_points.txt :language: python3 :lines: 3- .. note:: More tests are provided in the :download:`update_points.txt` file. .. rubric:: Solution A solution is provided in the :download:`fidelity.py` file.