getting the player' move def enterplayermove() let the player type in their move return two-item list of int xy coordinates print('where do you want to drop the next sonar device( - - (or type quit)' while true move input( if move lower(='quit' print('thanks for playing!' sys exit(the enterplayermove(function collects the xy coordinates of the player' next move the while loop will keep asking the player for their next move until they enter valid move the player can also type in 'quitto quit the game in that caseline calls the sys exit(function to terminate the program immediately move move split( if len(move= and move[ isdigit(and move[ isdigit(and isvalidmove(int(move[ ])int(move[ ])) return [int(move[ ])int(move[ ]) print('enter number from to spacethen number from to 'assuming the player has not typed in 'quit'the code must ensure it is valid movetwo integers separated by space line calls the split(method on move as the new value of move if the player typed in value like ' 'then the list returned by split(would be [' '' '' 'in that casethe expression len(move= would be false and the entire expression evaluates immediately to false python doesn' check the rest of the expression because of short-circuiting (which was described in if the list' length is then the two values will be at indexes move[ and move[ to check if those values are numeric digits (like ' or ' ')you could use function like isonlydigits(from but python already has function that does this the string method isdigit(returns true if the string consists solely of numbers otherwise it returns false try entering the following into the interactive shell' isdigit(true 'fortyisdigit(