Flat rate ========= Save all functions into the file ``flatrate.py``. The customer data of a mobile phone company is stored into a nested list. Each element of the main list is a sublist that represents a client and consists of a client identifier (string), his/her assigned flat rate (MB, integer) and his/her consumptions in the last month (MB, integer). In the following example, there is a client whose ID is '444B', and has a flat rate of 200MB and three recorded consumptions of 70MB, 40MB and 120MB, respectively. #. Write the function :py:func:`total_consump` that takes a client list corresponding to a month, and returns the total consumption of all clients in this month. See the following examples: .. literalinclude:: flatrate1.txt :language: python3 :lines: 3- .. note:: More tests are provided in the :download:`flatrate1.txt` file. #. Write the function :py:func:`big_consump` that takes a client list, and returns another list with the identifiers of those clients in the given list with an individual consumption greater than their assigned flat rate. This list mut be sorted increasingly. See the following examples: .. literalinclude:: flatrate2.txt :language: python3 :lines: 3- .. note:: More tests are provided in the :download:`flatrate2.txt` file. #. Write the function :py:func:`first_big_consump` that takes a client list, and returns a string with the identifier of the first client in this list with an individual consumption greater than his/her assigned flat rate. If there is no such client, the function must return an empty string. See the following examples: .. literalinclude:: flatrate3.txt :language: python3 :lines: 3- .. note:: More tests are provided in the :download:`flatrate3.txt` file. #. Write the modifier function :py:func:`update` that given a client list and a price (Euros per MB, float), updates this list in the following way. For all clients in the list with a total consumption greater than the assigned flat rate, a new item is added at the end of this client sublist with the extra amount in euros that he/she will have to pay (float). This amount is computed as the multiplication of the given price by the extra MB spent by the client (the total consumption minus the assigned flat rate). Those clients that have not exceeded the assigned MB remain unchanged. See the following examples: .. literalinclude:: flatrate4.txt :language: python3 :lines: 3- .. note:: More tests are provided in the :download:`flatrate4.txt` file. .. rubric:: Solutions A solution of these functions is provided in the file :download:`flatrate.py `.