~~`~`~~```~``~~``~~~``~~`~`~~`~`~```~```~~~```~~~~~~`~`~~~~ ```~``~`~~~`~~```~``~``~~~```~````~```~`~~`~~~~~`~``~~~~~`` `~~~~```~`~````~`~`~~``~`~~~~`~``~``~```~~```````~`~``~```` ~~`~`~~`~``~`~~~````````````````~~`````~`~~``~`~~~~`~~~`~~` the solution is easy add space only in front of all the single-digit numbers lines to set the variable extraspace to either space or an empty string the extraspace variable is always printedbut only has space character in it for single-digit row numbers otherwiseit is the empty string this wayall of the rows will line up when you print them the getrow(function takes row number and returns string representing that row' ocean waves its two parameters are the board data structure stored in the board variable and row number let' look at this function next drawing the -coordinates along the bottom print the numbers across the bottom print(print((' )print(hlinelines to are similar to lines to they print the -axis coordinates at the bottom of the screen getting the state of row in the ocean def getrow(boardrow) return string from the board data structure at certain row boardrow ' for in range( ) boardrow +board[ ][row return boardrow while the board parameter is data structure for the entire ocean' wavesthe getrow(function creates string for single row first set boardrow to the blank string the -axis coordinate is passed as the row parameter the string is made by concatenating board[ ][row]board[ ][row]board[ ][row]and so on up to board[ ][rowthis is because the row contains charactersfrom index to index the for loop on line iterates over integers to on each iterationthe next character in the board data structure is copied on to the end of boardrow by the time the loop is doneboardrow has the complete row' ascii art waves and is returned