Conditional statement simplification ==================================== Analyse which of these functions with conditional statements can be simplified. Then simplify those that can be simplified (removing the conditional statement). #. .. code:: python def f1(a): if a > 0: b = a else: b = abs(a) return b #. .. code:: python def f2(found): if found : equals = False else: equals = True return equals #. .. code:: python def f3(a, b): if a != b : equals = False else: equals = True return equals #. .. code:: python def f4(n): a = n%3 if a == 0: b = 1 elif a == 1: b = 2 elif a == 2: b = 3 return b #. We have been given the following function ``avoidable``. Discuss the result returned for the calls ``avoidable(a, 'A')`` with the following current values for parameter ``a``: ``10``, ``11``, ``12``, ``13`` and ``14``. Next, analyse whether it can be simplified or not and, if, so, simplify it by removing the conditional statement .. code:: python def avoidable (a, letter): b = a%4 if b == 0: c = '' elif b == 1: c = letter elif b == 2: c = letter + letter else: c = b * letter return c .. rubric:: Solution A solution is provided in file :download:`avoidables.py` file.