created part_3_functions.pl

contains some functions that will be useful for part-3 of the project.