Updated functions.py file

Assignment 5 and the updated functions-file containing assignment
5-specific funtions.