print("" ++++ |{}|{}|{}|{} ++++ |{}|{}|{}|{} ++++ |{}|{}|{}|{} ++++ |{}|{}|{}|{} ++++ ""format(*labels) def getscore(board) """returns the sum of all the tiles on the board data structure "" score loop over every space and add the tile to the score for in range( ) for in range( ) only add non-blank tiles to the score if board[(xy)!blank score score board[(xy) return score def combinetilesincolumn(column) """the column is list of four tile index is the "bottomof the columnand tiles are pulled "downand combine if they are the same for examplecombinetilesincolumn([ blank blank] returns [ blankblankblank"" copy only the numbers (not blanksfrom column to combinedtiles combinedtiles [ list of the non-blank tiles in column for in range( ) if column[ !blank combinedtiles append(column[ ] keep adding blanks until there are tiles while len(combinedtiles combinedtiles append(blank combine numbers if the one "aboveit is the sameand double it for in range( )skip index it' the topmost space if combinedtiles[ =combinedtiles[ ] combinedtiles[ * double the number in the tile move the tiles above it down one space for aboveindex in range( )twenty forty-eight