Physics ======= Write the Phyton functions to solve the following physics problems: #. Write the function :py:func:`amps`, that from a given electric potential difference value expressed in volts and a given resistance value expressed in ohms of an electric circuit, returns the electric current intensity in accordance to Ohm's law. Save the function into the file named :file:`physics1.py`. The function must pass the following doctest: .. literalinclude:: physics1.txt :language: python3 :lines: 3-8 .. note:: You can download the file with tests :download:`physics1.txt ` #. Write the function :py:func:`velocity` that, given a time in minutes and a distance in kilometers, corresponding to a uniform lineal motion of a body travel, returns its velocity in m/s. Save the function into the file named :file:`physics2.py`. The function must pass the following doctest: .. literalinclude:: physics2.txt :language: python3 :lines: 3-8 .. note:: You can download the file with tests :download:`physics2.txt ` #. Write function :py:func:`ualm` that given the acceleration (in :math:`\mathrm{m/s}^2`), the starting velocity (in :math:`\mathrm{m/s}`), the starting position, in meters, and a time in minutes, corresponding to an uniformly accelerated linear motion of a body travel, returns the final position of this body in meters. Save the function into the file named :file:`physics3.py`. The function must pass the following doctest: .. literalinclude:: physics3.txt :language: python3 :lines: 3-8 .. note:: You can download the file with tests :download:`physics3.txt ` #. An automobile is at the origin and travels in a uniform linear motion with a velocity ``v1`` expressed in km/h. Another car that is at a distance of ``x`` meters forward from the previous one starts to move ``t`` seconds after the first car and in the same direction at a constant velocity ``v2`` (in km/h). Write the function :py:func:`car` that given ``v1``, ``v2``, ``x`` and ``t`` returns the time (in seconds) that the first car needs to catch up with the second one. We will assume that velocity ``v2`` in inferior than ``v1`` and that the first car will catch up with the second one after the second one starts moving. Save the function into the file named :file:`physics4.py`. The function must pass the following doctest: .. literalinclude:: physics4.txt :language: python3 :lines: 3-8 .. note:: You can download the file with tests :download:`physics4.txt ` .. rubric:: Solution A solution of these functions is provided in the :download:`physics1.py`, :download:`physics2.py`, :download:`physics3.py`, :download:`physics4.py`