compute the total sales of single item in all stores over all months def totalsalesbyitemsalesdataitem )the item number must be offset by item accumulate the total sales for the given month total iterate over each store for in rangesalesdata length( )iterate over each month of the store for in rangesalesdata length( )total +salesdata[simreturn total the cells of the array that would be accessed when using this function to compute the total sales for item number are shown by the shaded area in figure (brememberthe sales for each item are stored in specific row of the array and the index of that row is one less than the item number since the indices start at st or es items items ( st or es ( months months figure the elements of the - array that must be accessed to compute the total sales(afor the month of january and (bfor item number monthly sales by store finallysuppose we want to compute the total monthly sales for each of the months at given store while the previous examples computed single valuethis task requires the computation of different totalsone for each month we can store the monthly totals in - array and return the structureas is done in the following function