assignment_4 obtained, completed first two functions
assignment 4 fct/docstring completed. Need comments and optimizations
completed assignment 4