Powers ====== Save both functions into the file ``powers.py``. 1. Write the function :py:func:`powers_1` that takes two positive integers, ``x`` and ``maxn``, and returns the average of the sequence of powers of ``x`` less than or equal to ``maxn``. Examples: .. literalinclude:: powers-1.txt :language: python3 :lines: 3- .. note:: More tests are provided in file :download:`powers-1.txt ` 2. Write the function :py:func:`powers_2` that takes two positive integers, ``x`` and ``maxn``, and another integer, ``d``, such that ``0<=d<10``, and returns the first number of the sequence of powers of ``x`` less than or equal to ``maxn`` such that its digit in the units position is ``d``. If there is no such number, this function must return ``-1``. Examples: .. literalinclude:: powers-2.txt :language: python3 :lines: 3- .. note:: More tests are provided in file :download:`powers-2.txt ` .. rubric:: Solution A solution is provided in file :download:`powers.py `