Update part_3_functions.pl

Now, dynamic programs with 3-D arrays also work