for in range(numcol)lab label(selftext='?'relief=sunkenlab grid(row=numrow+ column=isticky=nsewself sums append(labbutton(selftext='sum'command=self onsumgrid(row= column= button(selftext='print'command=self onprintgrid(row= column= button(selftext='clear'command=self oncleargrid(row= column= button(selftext='load'command=self onloadgrid(row= column= quitter(selfgrid(row= column= failsquitter(selfpack(def onprint(self)for row in self rowsfor col in rowprint(col get()end='print(print(def onsum(self)tots [ self numcol for in range(self numcol)for in range(self numrow)tots[ +eval(self rows[ ][iget()for in range(self numcol)self sums[iconfig(text=str(tots[ ])def onclear(self)for row in self rowsfor col in rowcol delete(' 'endcol insert(end' 'for sum in self sumssum config(text='?'def onload(self)file askopenfilename(if filefor row in self rowsfor col in rowcol grid_forget(for sum in self sumssum grid_forget(filelines open(file' 'readlines(self numrow len(filelinesself numcol len(filelines[ split()self makewidgets(self numrowself numcolsum current data delete content preserve display erase current gui load file data resize to data for (rowlinein enumerate(filelines)load into gui fields line split(for col in range(self numcol)self rows[row][coldelete(' 'endself rows[row][colinsert(endfields[col] tkinter tourpart