Write in Python the pure iterative version of the function defined in the [previous exercise](#32).
Write in Python the pure iterative version of the function defined in the previous exercise.