finished print_table function

completed the function to print out results tables with averages.