Greatest Path Sum in a Grid ( Due 30 Oct 2020 )

Assume that you have square grid of positive integers. You want to start at the top left corner in the grid and work your way down to the bottom right corner. The contraint that you have is that you can only move either to the right or down from your current position in the grid. You want to take the path that gives you the greatest sum.

Input:
You will read your data from standard input in the following format: grid.in. The first line in input will be the dimension n of this square grid. The dimension of the grid will be between 5 and 40 inclusive. It will be followed by n lines of data. Each line will have n positive integers between 1 and 99 inclusive.

Output:
First you will print to standard out the total number of paths in the grid and then you will output the greatest path sum in the grid. You do NOT have to output the actual path.

Here is the template of the code Grid.py that you will be submitting. You may NOT change the names of the functions but you may add as many helper functions as needed. You will follow the standard coding conventions in Python. Your program will have a header as follows:

#  File: Grid.py

#  Description:

#  Student Name:

#  Student UT EID:

#  Partner Name:

#  Partner UT EID:

#  Course Name: CS 313E

#  Unique Number: 

#  Date Created:

#  Date Last Modified:
You may add as many helper functions as you need. Mac users will run their code as follows on the command line:
python3 Grid.py < grid.in
Windows users will run their code as follows in the cmd window:
python Grid.py < grid.in

You may not change the function signatures of count_paths() and path_sum . You may add any helper functions that you may need. For the test grid, the sample output will look like:

48620 

1117

For this assignment you may work with a partner. Both of you must read the paper on Pair Programming and abide by the ground rules as stated in that paper. If you are working with a partner then only one of you will submit the code. Make sure that in the header in Canvs that you have your name and UT EID and your partner's name and UT EID. If you are working alone then you will just have your name and your UT EID.

Use the Canvas system to submit your Grid.py file. We should receive your work by 11 PM on Friday, 30 Oct 2020. There will be substantial penalties if you do not adhere to the guidelines. Remember Python is case sensitive. The name of your file must match exactly what we have specified.